[thelist] PHP String Indexed Arrays
Shashank Tripathi
sub at shanx.com
Fri Jun 7 01:18:01 CDT 2002
Jacob,
Try this somewhat kludgish code. But in general, I wonder why you really
need to work with the string arrays anyway!
Cheers,
Shashank
---------
<?php
$myhref = "index.php";
$sections = array ("case" => "case studies", "client" => "by client",
"type"=> "by type");
print_r($sections);
echo "<p>";
global $sections;
global $myhref;
echo"<p class=\"subWORK\"> ";
$ctr = 0;
foreach ($sections as $sectionID => $section)
{
$ctr++;
echo"<a href=\"$myhref?$sectionID\"> $section</a> ";
if ($ctr <> sizeOf($sections))
{
echo" // ";
}
}
?>
More information about the thelist
mailing list