Re: Help with eval()

From: Date: Thu, 29 May 2003 16:32:07 +0000
Subject: Re: Help with eval()
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-149454@lists.php.net to get a copy of this message
Ok, it works now! Thanks! Go visit what I'm working on at: http://zavaboy.jimbug.org/phptest/blog.php I'm working on a blog, mainly for myself... If you go there, tell me if the yellow days are clickable. Also tell me if you see red dates on the blog. I should be the only one to see those things because the PHP looks for a matching IP. Thanks again! "Marek Kilimajer" <kilimajer@webglobe.sk> wrote in message news:3ED62DFC.10505@webglobe.sk... > yes, missing semi-comma: > for ($i = $aNum; eval ('return $i ' . $do . ' $bNum;'); ) > > the rest is up to you, I don't know what you want to do whit it > > Marek Kilimajer wrote: > > > for ($i = $aNum; eval ('return $i ' . $do . ' $bNum'); ) > > > > > > > > zavaboy wrote: > > > >> Hey, > >> > >> I'm having problems with the eval() function... > >> > >> if ($Sort == "Up") { > >> $do="<="; > >> } else { > >> $do=">="; > >> } > >> for ($i = $aNum; eval ('$i ' . $do . ' $bNum'); ) > >> //So.. the above line acts like: > >> //for ($i = $aNum; $i <= $bNum; ) > >> //...or... > >> //for ($i = $aNum; $i <= $bNum; ) > >> { > >> i > >> if ($Sort == "Up") { > >> $i++; > >> } else { > >> $i-- > >> } > >> > >> Any idea how to make it work right? > >> > >> > >> > >> - Zavaboy > >> zavaboy@hotmail.com > >> www.zavaboy.com > >> > >> > >> > >> > >> > > > > >

« previous php.general (#149454) next »