[PHP-DB] Deleting characters from a string...

2002-02-08 Thread Luke

Hi,

I have a string that says width=123 Height =456 and I need to for mat the
output as

123 x 456

is there a way to do this?

Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Deleting characters from a string...

2002-02-08 Thread Jeroen Timmers

use substr
http://www.php.net/manual/en/function.substr.php

good luck

Jeroen

- Original Message - 
From: Luke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, October 08, 2001 11:09 AM
Subject: [PHP-DB] Deleting characters from a string...


 Hi,
 
 I have a string that says width=123 Height =456 and I need to for mat the
 output as
 
 123 x 456
 
 is there a way to do this?
 
 Thanks
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] Deleting characters from a string...

2002-02-08 Thread Rick Emery

If you are certain the format will ALWAYS be as you indicate, then try:

eregi(width=([0-9]*) height=([0-9]*), $mystring, $reg);
$newstring = $reg[1], x .$reg[2];


NOTE: I don't have PHP here at work (I've got it at home).  So you may have
to tweak this.
-Original Message-
From: Luke [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 08, 2001 5:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Deleting characters from a string...


Hi,

I have a string that says width=123 Height =456 and I need to for mat the
output as

123 x 456

is there a way to do this?

Thanks



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php