> Wrong. They are equivalent. The second is probably just easier to follow
> with a clearly defined default value outside the conditional block.

Well, leaving out the default value at the 2nd if statement makes a
difference and that's what I did.
Here is the code I changed again ..

Set to $_GET['search'] or an empty string
<?php
$search = isset($_GET['search']) ? $_GET['search'] : '';
?>

Only set if there is a $_GET['search']
<?php
// no default value <<<
if (isset($_GET['search'])) $search = $_GET['search'];
?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to