Re: problem that has been really annoying me...

From: Date: Mon, 15 Jan 2001 18:00:21 +0000
Subject: Re: problem that has been really annoying me...
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-34639@lists.php.net to get a copy of this message
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" <php-lists@imawebdesigner.com> To: <PeterOblivion@aol.com>; <php-general@lists.php.net> 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: <PeterOblivion@aol.com> > To: <php-general@lists.php.net> > 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: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#34639) next »