[thelist] php question revisited

Dan McCullough dan.mccullough at gmail.com
Tue Jun 28 14:55:37 CDT 2005


By looking at the small snippet  I would say that works, would work
for me.  however I dont know what you are passing and if the
$category->nicename would equal $current.  if $current = name and 
$category->nicename = Name, that would cause it to NOT be true, so
there could be a problem with that, in which case you can either live
with that, Name being different from name, or you can evaluate the
string after running it through something like strtoupper to make the
string all upper case and if the string is more then one word you
coudl remove the white spaces to make it a long string, not sure how
picky or exact you want to be.

On 6/28/05, Tom Dell'Aringa <pixelmech at yahoo.com> wrote:
> My most recent post may have been too detailed so here is the problem simplified. I want to make
> an equality match. I have a variable with a string value:
> 
> $current - which equals something like 'some-category'
> 
> Then I have a variable in my function like this:
> 
> $category->nicename - which holds something similar to $current - a string.
> 
> I want to test if these are equal. Can I simply do:
> 
> if ($current == $category->nicename) { do stuff } ?
> 
> I tried that and it didn't seem to work, so I am thinking I'm on the wrong track...
> 
> Tom
> 
> 
> http://www.pixelmech.com/
> 
> Melissa: Ace, Where are you?
> Ace Ventura: I'm in Psychoville and Finkle's the Mayor.
> 
> --
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


More information about the thelist mailing list