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 i
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 the
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 w
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 a
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!
>
>
> $string = "73G146C 311- 309.1C";
>
> $arr = pre
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=>
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
> m
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
> m
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
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 containi
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...
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,"")
In PHP, the following doesn't seem to work:
$var = str_replace(chr(13),"\n",$value)
Neither does:
$var = str_replace(chr(10),"\n",$valu
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 tag..
u need to put
$var = str_replace(chr(13),"",$value) in order to got the required
output
Midhun Girish
On Fri, Apr 2, 2010 at 7:03 PM, Ashley Sheri
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,"")
>
> In PHP, the following doesn't seem to work:
> $var = str_replace(chr(13),"\n",$value)
>
> Neither do
Hi folks,
In ASP, I would commonly replace string line feeds for HTML output like
this:
Var = replace(value,vbcrlf,"")
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!
16 matches
Mail list logo