Re: string

From: Date: Fri, 17 May 2002 12:47:59 +0000
Subject: Re: string
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19232@lists.php.net to get a copy of this message
Sure- $test = "text1"; if(substr($test, -1) == 1){
        print "do something";
} else{
        print "didn't equal 1 ";
At 08:00 AM 5/17/2002 -0400, Natividad Castro wrote:
Hi to all, how can I evaluate a variable? For example $test = "test1"; then I want to evaluate if $test contains 1 at the end. Is there any way to evaluate that variable to see if the number 1 is at the end? Thanks Nato -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.db (#19232) next »