...

View Full Version : List item Allignment



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



<?php

$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.

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

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

like



echo "<ul style=\"margin-left:25px\"";
or
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