[thelist] Multiple PHP Varialbes and Single Quote Syntax Question

Jono Jono at charlestonwebsolutions.com
Tue Dec 5 05:15:52 CST 2006


Juha Suni wrote:
> Jono wrote:
>   
>> Would this work?:
>>
>> <? if ($filename=='cool-site.php')
>>        {$parent = 'cool-site.php'; && $thisPage = 'Cool Site'; &&
>> $PageHeader = 'Cool Site Header Text Here'; }
>>     
>
> <?php
> if ($filename=='cool-site.php')
> {
>    $parent = 'cool-site.php';
>    $thisPage = 'Cool Site';
>    $PageHeader = 'Cool Site Header Text Here';
> }
>
> Also see http://fi2.php.net/switch, which is better for this kind of stuff 
> where you have lots of similar if-clauses.
>
>   
This looks pretty straight forward too.  I am currently testing out the 
switch method that Rick mentioned.

It's crazy how many different ways there are to accomplish a single task 
in PHP.  That has been the largest hurdle so far; knowing what to use, 
and why to use it.

Thanks everyone!

-- 
Jono Young
../Designer ../Developer ../Illustrator
Charleston Web Solutions
Bringing Higher Standards to the Lowcountry
www.charlestonwebsolutions.com



More information about the thelist mailing list