php-general | 2000071
Date: 07/14/00
- Next message: Jeff Wolkove: "[PHP] php3.ini file"
- Previous message: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- In reply to: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Next in thread: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Reply: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
'fraid these suggestions don't work either.
maybe I'm expecting PHP to do too much other than the
simple replacement of values in Strings.
I accept that if I declare variables
$value = 1 and
$today = 1
in my 'application' then parse the Src_File it
substitutes the values of $value & $today for their
numeric value, but I thought I should still be able to
evaluate/process the statement, and if there is any
result/output, pass this back to the string you've
assigned ($new_string)
very puzzled & confused,
alan
> >
> > You probably want something along the lines of:
> >
> > $complete_code = '($value == $today) ? "Hello
World" : ""';
> >
> > and then
> >
> > eval("\$new_string = \"$complete_code\";);
>
> Actually, get rid of the \"'s there.
>
> -Rasmus
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff Wolkove: "[PHP] php3.ini file"
- Previous message: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- In reply to: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Next in thread: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Reply: Rasmus Lerdorf: "Re: [PHP] problem with eval()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

