Visa ett inlägg
Oläst 2008-03-09, 19:11 #3
KarlRoos KarlRoos är inte uppkopplad
Har WN som tidsfördriv
 
Reg.datum: Jul 2007
Inlägg: 1 416
KarlRoos KarlRoos är inte uppkopplad
Har WN som tidsfördriv
 
Reg.datum: Jul 2007
Inlägg: 1 416
Kod:
function make_list($urls,$titles,$displays)
{
	$return = '';
	foreach($urls as $url)
	{
 $return = $return . $url;
 foreach($titles as $title)
 {
 	$return = $return . $title;
 	foreach($displays as $display)
 	{
  $return = $return . $display;
 	}
 }
	}
	return $return;
}
blir...
Citat:
url0title0display0display1title1display0display1ur l1title0display0display1title1display0display1
Jag förstår ju varför..
1:1 -> 1:1, 2:1, 2:2, 3:1, 3:2
1:2 -> 1:2, 2:1, 2:2, 3:1, 3:2
.. men det funkade innan jag bytte namn på variablarna, finns det något annat sätt?
Något som borde fungera är
Kod:
foreach($urls as $url and $titles as $title and $displays as $display)
men det funkade inte :unsure:
KarlRoos är inte uppkopplad   Svara med citatSvara med citat