php-general Digest 2 Apr 2010 23:05:23 - Issue 6672
Topics (messages 303749 through 303755):
str_replace help
303749 by: David Stoltz
303750 by: Ashley Sheridan
303751 by: Midhun Girish
303752 by: Nilesh Govindarajan
SimpleXMLElement and gb2312 or big5
On Thu, Apr 1, 2010 at 11:30 PM, Nilesh Govindarajan li...@itech7.comwrote:
On 04/01/10 23:03, Kevin Kinsey wrote:
Nilesh Govindarajan wrote:
libphp5.so doesn't need the php binary.
You're right, and of course not. libphp5.so
*is* a PHP binary :-)
I've confirmed this using a test.
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,br)
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),\n,$value)
Neither does:
$var = str_replace(chr(10),\n,$value)
What am I doing wrong?
Thanks!
On Fri, 2010-04-02 at 09:28 -0400, David Stoltz wrote:
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,br)
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),\n,$value)
Neither does:
$var =
well david actually $var = str_replace(chr(13),\n,$value) will replace
char(13) with \n... but \n wont come up in html unless u give a pre tag..
u need to put
$var = str_replace(chr(13),br/,$value) in order to got the required
output
Midhun Girish
On Fri, Apr 2, 2010 at 7:03 PM, Ashley
On 04/02/10 18:58, David Stoltz wrote:
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,br)
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),\n,$value)
Neither does:
$var = str_replace(chr(10),\n,$value)
I use the following code to get rss and parse it, but the code
occasionally have issues with gb2312 or big-5 encoded feeds, and fails to
parse them. However other times may appear just okay. Any thoughts? Maybe
SimpleXMLElement is simply not meant for other language encodings...
I use the following code to get rss and parse it, but the code
occasionally have issues with gb2312 or big-5 encoded feeds, and fails to
parse them. However other times may appear just okay. Any thoughts? Maybe
SimpleXMLElement is simply not meant for other language encodings...
Hello everyone,
It's quite simple but I'm still stuck.
What I need is the following: I have an array as a parameter of my
custom function. However, I'd like to allow users to enter a string
instead of an array. In this case (if the parameter is a string), it
must be replaced with an array
I have an array that's created as follows:
$string = 73G146C 311- 309.1C;
$arr = preg_split(/[\s]+/, $string);
Now I need to take each element in that array, and break them up even
further so that I get:
73G= 73 and G
146C = 146 and C
311- = 311 and -
309.1C =
Andre Polykanine wrote:
Hello everyone,
It's quite simple but I'm still stuck.
What I need is the following: I have an array as a parameter of my
custom function. However, I'd like to allow users to enter a string
instead of an array. In this case (if the parameter is a string), it
must be
Andre Polykanine wrote:
Hello everyone,
It's quite simple but I'm still stuck.
What I need is the following: I have an array as a parameter of my
custom function. However, I'd like to allow users to enter a string
instead of an array. In this case (if the parameter is a string), it
must be
Ashley M. Kirchner wrote:
I have an array that's created as follows:
$string = 73G146C 311- 309.1C;
$arr = preg_split(/[\s]+/, $string);
Now I need to take each element in that array, and break them up even
further so that I get:
73G= 73 and G
146C =
Jim Lucas wrote:
Ashley M. Kirchner wrote:
I have an array that's created as follows:
$string = 73G146C 311- 309.1C;
Anyone want to take a stab at it?
Conditionals are your friend!
plaintext?php
$string = 73G146C 311- 309.1C;
$arr = preg_split(/[\s]+/,
Hi all,
I want to be able to have an array of elements of different types. As an
example: the first element is a boolean, the second is an integer, and the
thirs is a string.
In php there is no typing, i'm just wondering if there is a way to have that,
it would be a lot better than having an
Php Developer wrote:
Hi all,
I want to be able to have an array of elements of different types. As an
example: the first element is a boolean, the second is an integer, and the
thirs is a string.
In php there is no typing, i'm just wondering if there is a way to have that,
it would be
On 04/03/10 04:56, Nathan Rixham wrote:
Andre Polykanine wrote:
Hello everyone,
It's quite simple but I'm still stuck.
What I need is the following: I have an array as a parameter of my
custom function. However, I'd like to allow users to enter a string
instead of an array. In this case (if
On 04/03/10 05:42, Nathan Rixham wrote:
Php Developer wrote:
Hi all,
I want to be able to have an array of elements of different types. As an
example: the first element is a boolean, the second is an integer, and the
thirs is a string.
In php there is no typing, i'm just wondering if there
18 matches
Mail list logo