View Full Version : List item Allignment

12-10-2010, 04:27 AM
whats wrong with my code.


$Luzon = array("ML" => "Manila", "QC" => "Quezon", "SJ" => "San Juan");

$Visayas = array("CB" => "Cebu", "IL" => "Iloilo", "BC" => "Bacolod");

$Mindanao = array("DC"=> "Davao", "CDO" => "Cagayan De Oro", "BK"=>"Bukidnon");

$Philippines = array("Luzon"=>$Luzon, "Visayas"=>$Visayas, "Mindanao"=> $Mindanao);

foreach($Philippines as $Islands => $City)
echo "<H2>$Islands</H2>";
echo "<ul>";
foreach($City as $Code => $Name)

echo "<li>$Code - $Name</li>";
echo " </ul>";

i want all the list items to be vertically straight.
tnx for the help.

12-10-2010, 04:38 AM
can you post the forumat of the output how you need.

12-10-2010, 05:33 AM
without seeing the output its hard to tell, but i think what you want is to add a style to your ul


echo "<ul style=\"margin-left:25px\"";
echo '<ul style="margin-left:25px" ';

that should put column lined up on the left for you

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum