O wait... I think I see what you're saying... the database actually has an
entry in it that is '$title', not the value of $title... what you need to
do is run eval('echo ' . $num['sub']) instead of the print command you've
got right now (note: print/echo makes no difference for this example; just
my personal pref to stick with echo).
Regards,
--Toby
----- Original Message -----
From: "Toby Butzon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, January 15, 2001 12:35 PM
Subject: Re: [PHP] problem that has been really annoying me...
> First of all check this:
>
> print(stripslashes("$num[sub]"));
> ... should be...
> print(stripslashes($num['sub']));
>
> That will change the result, but I don't know if it's the result you're
> going for...
>
> One other note of interest... why is your variable named $num? If it was
> supposed to be a significant number I would understand, but as far as I
can
> tell, it's not... so you might consider changing this to be a little more
> descriptively named ;)
>
> --Toby
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 15, 2001 12:21 PM
> Subject: [PHP] problem that has been really annoying me...
>
>
> > I have a problem which i dont know how to solve....
> >
> > my script...
> > $game = "roguespear";
> > $title = "quepasa??mecasa...";
> > $num = mysql_query("SELECT * FROM DLtemplates WHERE id='$game'");
> > $num =mysql_fetch_array($num);
> > print(stripslashes("$num[sub]"));
> >
> > what sub in DLtemplates where id=$game = $title
> >
> > so why does it print
> > $title on the screen and not "quepasa??mecasa...";
> >
> > any help apprecaited
> >
> > - Peter
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]