Re: [PHP] very quick Regex query

2011-02-28 Thread Ashley Sheridan
"David Hutto" wrote: >On Tue, Mar 1, 2011 at 2:28 AM, David Hutto >wrote: >> On Mon, Feb 28, 2011 at 10:07 PM, Alexis >wrote: >>> Hi, >>> >>> I know not strictly a PHP question, but was just wondering if >someone can >>> tell me the regex format for something please. >>> >>> I need to replace >

Re: [PHP] very quick Regex query

2011-02-28 Thread David Hutto
On Tue, Mar 1, 2011 at 2:28 AM, David Hutto wrote: > On Mon, Feb 28, 2011 at 10:07 PM, Alexis wrote: >> Hi, >> >> I know not strictly a PHP question, but was just wondering if someone can >> tell me the regex format for something please. >> >> I need to replace >> .. >> with >> > > A

Re: [PHP] very quick Regex query

2011-02-28 Thread David Hutto
On Mon, Feb 28, 2011 at 10:07 PM, Alexis wrote: > Hi, > > I know not strictly a PHP question, but was just wondering if someone can > tell me the regex format for something please. > > I need to replace > .. > with > A good text editor should have find .. and replace with --

Re: [PHP] Sorting an array

2011-02-28 Thread Simon J Welsh
On 1/03/2011, at 4:52 PM, Ron Piggott wrote: > > I need help to know how to sort the words / phrases in my array. > > Variable name: $words_used > print_r( $words_used ); Current output: Array ( [187] => Sin [249] => > Punished [98] => Sanctuary [596] => Sing [362] => Anointing Oil ) > Desired

[PHP] Implementing strict types

2011-02-28 Thread Paul McGarry
I am looking at implementing something roughly equivalent to strict typing for a part of my code. Has anybody else had a go at such a thing? I have some data types which I'm implementing as classes (base types like "int" but also more specific types like "country") and I'd like to be able to use t

[PHP] Sorting an array

2011-02-28 Thread Ron Piggott
I need help to know how to sort the words / phrases in my array. Variable name: $words_used print_r( $words_used ); Current output: Array ( [187] => Sin [249] => Punished [98] => Sanctuary [596] => Sing [362] => Anointing Oil ) Desired result: Alphabetical sort: Array ( [362] => Anointing Oil [2

[PHP] very quick Regex query

2011-02-28 Thread Alexis
Hi, I know not strictly a PHP question, but was just wondering if someone can tell me the regex format for something please. I need to replace .. with That is six periods replaced by eight hyphens. Many thanks Alexis -- PHP General Mailing List (http://www.php.net/) To unsubscri

Re: [PHP] Figuring out file-encoding

2011-02-28 Thread Jeffrin Jose
On Mon, Feb 28, 2011 at 06:20:30PM +0100, Asmann, Roland wrote: > I need to read several files from the HD, but they are saved in > different encodings. Can I somehow figure out which encoding I should > use when reading the file? i think detect the file encoding and decode it. as for detection

RE: [PHP] Re: Quotes in Heredoc

2011-02-28 Thread Bob McConnell
From: Colin Guthrie >'Twas brillig, and Bob McConnell at 28/02/11 13:23 did gyre and gimble: >> XHTML also requires all tags, attribute labels and values to be in lower >> case and values must be quoted. So your original content should be >> >> > width="621"> >> >> > src="../images/spacer.g

[PHP] Figuring out file-encoding

2011-02-28 Thread Asmann, Roland
Hi all, I need to read several files from the HD, but they are saved in different encodings. Can I somehow figure out which encoding I should use when reading the file? Thanks. -- Roland Asmann Senior Software Engineer adesso Austria GmbH Floridotower 26. Stock T +43 1 2198790-2

[PHP] Re: Quotes in Heredoc

2011-02-28 Thread Colin Guthrie
'Twas brillig, and Bob McConnell at 28/02/11 13:23 did gyre and gimble: > XHTML also requires all tags, attribute labels and values to be in lower > case and values must be quoted. So your original content should be > >width="621"> > >src="../images/spacer.gif"> > Actually, in xhtml th

RE: [PHP] Quotes in Heredoc

2011-02-28 Thread tedd
At 8:23 AM -0500 2/28/11, Bob McConnell wrote: From: Ashim Kapoor From Ashley Sheridan The quotes you mention are in the HTML, nothing to do with PHP. HTML will work without the quotes in most cases (unless there's a space in the value for the attribute) but the quotes are required in X

RE: [PHP] Quotes in Heredoc

2011-02-28 Thread Bob McConnell
From: Ashim Kapoor > From Ashley Sheridan >> The quotes you mention are in the HTML, nothing to do with PHP. HTML will >> work without the quotes in most cases (unless there's a space in the value >> for the attribute) but the quotes are required in XHTML and will cause >> unexpected results. > >