You are here: Re: newbie - variable to string « PHP Programming Language « IT news, forums, messages
Re: newbie - variable to string

Posted by ImOk on 10/30/15 11:52

Sorry I meant:

print "^$testing^$end^";

ImOk wrote:
> Add the follwoing line before the if () to confirm contents:
>
> print "X$testingX$endX";
>
> Jarrod wrote:
> > Hi there,
> >
> > I am trying to get the value of the varible into an if statment that will
> > determine what to do.
> >
> > The value is from the end of an array, this works fine when i use echo to
> > print it out onto the page but cant pass the value into the if statement,
> > can someone please help me
> >
> > $testing = '10';
> > $end = end($array); // this would equal to 10
> >
> >
> > if($testing == $end){
> > print 'yes';
> > }else{
> > print 'no';
> > }

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация