13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Solution Overview<br />

827<br />

Listing 33.5 showCategories() Function from categoryfunctions.php—A List<br />

of Categories<br />

//display a starting list of popular categories<br />

function showCategories($mode) {<br />

global $categoryList;<br />

echo "Selected Categories";<br />

if($mode == 'Books') {<br />

asort($categoryList);<br />

$categories = count($categoryList);<br />

$columns = 4;<br />

$rows = ceil($categories/$columns);<br />

echo "";<br />

reset($categoryList);<br />

for($col = 0; $col

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!