Re: [PHP] x as a multiplier
This is off topic but the word for is called a quote mark. ;-) - Original Message - From: Bastian Vogt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 04, 2002 2:55 AM Subject: Re: [PHP] x as a multiplier Hi, try $newwidth. x .$newheight instead. It's important to put the spaces inside the - ...don't know the word :-) If it's still not working you could try settype($newwidth, string); settype($newheight, string); echo $newwidth. x .$newheigt; but I think, this is not necessary! HTH, Bastian Exactly. But it's only giving me one of the numbers without the space between the numbers and the x. $newwidth . x . $newheight -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] x as a multiplier
Is it possible you're mistaken somehow? x isn't an operator in PHP. Executing $a x $b will give you a parse error. Anything in quotes is automatically casted as a string. -Kevin - Original Message - From: John Meyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 3:20 PM Subject: [PHP] x as a multiplier Code: $newwidth . x . $newheight What I want to get out is a string, like 89x115. All I am getting though, is one number, even though if I do this $newwidth . x . $newheight It prints out just fine. What is going on here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] x as a multiplier
I don't think he's trying to multiply, I think he wants to print #x#, like 800x600 or 1024x768, etc... Adam On Tue, 3 Dec 2002, Kevin Stone wrote: Is it possible you're mistaken somehow? x isn't an operator in PHP. Executing $a x $b will give you a parse error. Anything in quotes is automatically casted as a string. -Kevin - Original Message - From: John Meyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 3:20 PM Subject: [PHP] x as a multiplier Code: $newwidth . x . $newheight What I want to get out is a string, like 89x115. All I am getting though, is one number, even though if I do this $newwidth . x . $newheight It prints out just fine. What is going on here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] x as a multiplier
Exactly. But it's only giving me one of the numbers without the space between the numbers and the x. -Original Message- From: Adam Williams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:48 PM To: Kevin Stone Cc: John Meyer; [EMAIL PROTECTED] Subject: Re: [PHP] x as a multiplier I don't think he's trying to multiply, I think he wants to print #x#, like 800x600 or 1024x768, etc... Adam On Tue, 3 Dec 2002, Kevin Stone wrote: Is it possible you're mistaken somehow? x isn't an operator in PHP. Executing $a x $b will give you a parse error. Anything in quotes is automatically casted as a string. -Kevin - Original Message - From: John Meyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 3:20 PM Subject: [PHP] x as a multiplier Code: $newwidth . x . $newheight What I want to get out is a string, like 89x115. All I am getting though, is one number, even though if I do this $newwidth . x . $newheight It prints out just fine. What is going on here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] x as a multiplier
At 23:20 03.12.2002, John Meyer said: [snip] Code: $newwidth . x . $newheight What I want to get out is a string, like 89x115. All I am getting though, is one number, even though if I do this $newwidth . x . $newheight It prints out just fine. What is going on here? [snip] Not sure what you mean here, you say you only get one number, but it prints out fine? However, this gives exactly what you want: code pre?php $a = 1024; $b = 768; $s = $a . 'x' . $b;// create a string echo $s; echo \n{$a}x{$b}\n; // or print it directly ? /pre /code Output for both cases: 1024x768 1024x768 -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] x as a multiplier
Adam, I know this. In reaction to the subject of John's post I cleared up the fact that x can not be acting as a multiplier becuase it is not an operator. My suggestion was that there may something else in his code that is causing the confusion.. making it look like it's doing something that it's not actually doing. Does that make more sense? :-\ John, please copy and paste the output of the following experiment.. $a = 1; $b = 2; echo $ax$b; echo $a.x.$b; echo $a.'x'.$b; -Kevin - Original Message - From: John Meyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 3:59 PM Subject: RE: [PHP] x as a multiplier Exactly. But it's only giving me one of the numbers without the space between the numbers and the x. -Original Message- From: Adam Williams [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 03, 2002 3:48 PM To: Kevin Stone Cc: John Meyer; [EMAIL PROTECTED] Subject: Re: [PHP] x as a multiplier I don't think he's trying to multiply, I think he wants to print #x#, like 800x600 or 1024x768, etc... Adam On Tue, 3 Dec 2002, Kevin Stone wrote: Is it possible you're mistaken somehow? x isn't an operator in PHP. Executing $a x $b will give you a parse error. Anything in quotes is automatically casted as a string. -Kevin - Original Message - From: John Meyer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 03, 2002 3:20 PM Subject: [PHP] x as a multiplier Code: $newwidth . x . $newheight What I want to get out is a string, like 89x115. All I am getting though, is one number, even though if I do this $newwidth . x . $newheight It prints out just fine. What is going on here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] x as a multiplier
Hi, try $newwidth. x .$newheight instead. It's important to put the spaces inside the - ...don't know the word :-) If it's still not working you could try settype($newwidth, string); settype($newheight, string); echo $newwidth. x .$newheigt; but I think, this is not necessary! HTH, Bastian Exactly. But it's only giving me one of the numbers without the space between the numbers and the x. $newwidth . x . $newheight -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php