Re: [PHP] Association Problem?

2004-06-21 Thread Rob Ellis
On Mon, Jun 21, 2004 at 12:09:50PM -0400, Gabe wrote: > Wanted to see if anyone had any input on this. I have a recordset that > is returned to me in my script. What I then would like to do is go > through each row of the recordset and use the substr_count function to > count the number of tim

Re: [PHP] Regular expression question

2004-05-27 Thread Rob Ellis
On Thu, May 27, 2004 at 09:59:05AM -0700, Dan Phiffer wrote: > So I'm trying to implement a simple wiki-like syntax for hyperlinking. > Basically I want to match stuff like [this], where the word 'this' gets > turned into a hyperlink. I have that working, but I want to be able to > escape the op

Re: [PHP] Re: strip comments from HTML?

2004-05-07 Thread Rob Ellis
On Thu, May 06, 2004 at 11:48:36PM -0400, Paul Chvostek wrote: > On Thu, May 06, 2004 at 07:11:55PM +, Curt Zirzow wrote: > > > > > > $text="one ", "",$text); > > > > Because your missing a - > > $text="one two\n"; > > /me applies mallet to head > > % php -r '$text="one two\n"; print >

Re: [PHP] Re: strip comments from HTML?

2004-05-06 Thread Rob Ellis
On Thu, May 06, 2004 at 12:47:10PM -0400, Paul Chvostek wrote: > On Thu, May 06, 2004 at 11:26:34AM -0400, Rob Ellis wrote: > > > > > > $text = ereg_replace("","",$text); > > > > you can make the .* less greedy... > > > >

Re: [PHP] Re: strip comments from HTML?

2004-05-06 Thread Rob Ellis
On Thu, May 06, 2004 at 11:10:17AM -0400, Paul Chvostek wrote: > On Thu, May 06, 2004 at 03:02:16PM +1000, Justin French wrote: > > > > This isn't working: > > $text = preg_replace('//','',$text); > > > > Can someone advise what characters I need to escape, or whatever to get > > it going? > >

Re: [PHP] A to Z incremental

2004-04-23 Thread Rob Ellis
On Fri, Apr 23, 2004 at 09:41:39PM +1000, electroteque wrote: > use the chr($i) system or range()... print implode(' | ', range('A', 'Z')); - rob > > > -Original Message- > > From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] > > Sent: Friday, April 23, 2004 9:31 PM > > To: 'Paul'; [EM

Re: [PHP] Formatting phone numbers?

2004-04-16 Thread Rob Ellis
On Thu, Apr 15, 2004 at 06:11:57PM -0400, John W. Holmes wrote: > Rob Ellis wrote: > >On Thu, Apr 15, 2004 at 04:31:09PM -0500, BOOT wrote: > >> > >>I'm looking for a way to take a 7 digit number and put it into xxx- > >>format. > >> > &

Re: [PHP] Formatting phone numbers?

2004-04-15 Thread Rob Ellis
On Thu, Apr 15, 2004 at 04:31:09PM -0500, BOOT wrote: > Thanks for any help, even if you just suggest built in functions to look at. > > I'm looking for a way to take a 7 digit number and put it into xxx- > format. > > So basically the logic is to count 3 characters into $number and insert a

Re: [PHP] Sorting array of objects

2004-04-05 Thread Rob Ellis
On Mon, Apr 05, 2004 at 05:03:17AM +0200, Richard Harb wrote: > Hi there, > > Supposed I have an array of objects, like: > > $this[$i]->property1 > $this[$i]->property2 > > is there any 'cheap' way to sort the array according to the values of > property1? > Try array_multisort() -> // cre

Re: [PHP] 'Content-Type: text/plain; charset=utf-8'

2004-04-01 Thread Rob Ellis
On Thu, Apr 01, 2004 at 01:55:50PM +0300, nabil wrote: > header ('Content-Type: text/plain; charset=utf-8'); > echo "Hi there"; > ?> > > > I need to echo a plain txt on my page, without any HTML tags. > my problem, when I run it on my apache, the save/open screen pops up. > > What's wrong pleas

Re: [PHP] PHP charset encoding

2004-03-30 Thread Rob Ellis
On Tue, Mar 30, 2004 at 11:23:03AM +0300, nabil wrote: > Hi all, > > I have problem storing the submitted data in the database in the right > encoding. > I need to use UTF-8 > > I need to save the Arabic text in UTF-8 encoding. > > I have a problem with UTF-8 and windows-1256 conversion. > I wis

Re: [PHP] how does array_multisort work?(!??)

2004-03-18 Thread Rob Ellis
On Thu, Mar 18, 2004 at 02:30:56PM -0500, David T-G wrote: > Hi, all -- > > I have an array like > > $a = > array > ( > 'key' => > array > ( > 'title' => "Topic Title", > 'content' => "Topic Content", > ), > ... > ) ; > > an

Re: [PHP] Small Problem - could you help me, please?

2004-03-17 Thread Rob Ellis
On Wed, Mar 17, 2004 at 06:11:31PM -0500, Jake McHenry wrote: > > I think you want something like: > > > >if (in_array($_SERVER['REMOTE_ADDRESS'], file('log.txt'))) > >die("Sorry, the access is denied."); > > > > - Rob > > > yes, that'll work too.. just more compact than what I post

Re: [PHP] Small Problem - could you help me, please?

2004-03-17 Thread Rob Ellis
On Thu, Mar 18, 2004 at 12:46:52AM +0200, Labunski wrote: > I have a small problem with the script - could you hepl me, please? > > I made small "kicking system" for those who tried to guess the Login > information. > The script below is just a part of the code, but it's not working properly. > I

Re: [PHP] Regex help - PLease

2004-03-16 Thread Rob Ellis
On Tue, Mar 16, 2004 at 02:39:27PM +0200, Brent Clark wrote: > Hi there > > im in desperate need of help for a reg expression to ONLY allow 8 NUMBERS to start > with 100 and may not have any other kind of > letters or characters. Only numbers > > for example > 10064893 > if (preg_match('/^1

Re: [PHP] deleting array elements

2004-03-09 Thread Rob Ellis
On Tue, Mar 09, 2004 at 05:22:37PM -, Benjamin Jeeves wrote: > Hi All > > I have two array one with a list of items in it. Then a second array with a list of > items in it what I want to be able to do is compare array1 to array2 and if a match > is found in both arrays delete that match fro