In article <004401c0d83d$c711a180$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Ender") wrote:

> Okay I am taking a number from a mySQL database and I want to put quotes on 
> that number?
> 
> How would I do this?
> 
> $databasenumber = 123.123.123.123;
> 
> How do I make 
> $databasenumber = "123.123.123.123";
> 
> To:
> runprogram("hls",$databasenumber);

Either you're confused...or I am. <g>  Are you thinking that the string 
must have quotes wrapped around it before it can be used as a parameter to 
a function?  'Cuz it's already coming out of the database as a string; 
despite the fact that the $databasenumber value gives the appearance of 
being a "number", it's not a numercial datatype such as an integer or a 
float--it's a string.  You should just be able to do some variation (add 
appropriate error checking) on the following:

$result=mysql_query("select foo as databasenumber from bar where 
whatever='something'");
$row=mysql_fetch_array($result);
extract($row);
runprogram("hls",$databasenumber);

(If the objective really is to concatenate literal quote characters onto a 
string, then the other poster already gave you a good solution.)

-- 
CC

-- 
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]

Reply via email to