[PHP] Re: Small regex help?

2005-10-12 Thread Ethilien
Hmmm, "/SELECT .* FROM (.*) WHERE (.*) ORDER BY .*/Ui", "SELECT count(*) FROM \$1 WHERE \$2" Might work, but haven't tried it... Guy Brom wrote: Can anyone suggest the correct regex to replace col1,col2... with count(*) and strip out everything just before ORDER BY? so for this: SELECT col1,

[PHP] Re: Hidden Form Help

2005-10-12 Thread Ethilien
To answer your questions: 1) No, there is no way to make data show up in both fields because the script you are currently using is probably echoing the data directly into a value attribute of the elements themselves. Also, by making two different elements in the same form have the same name, a

[PHP] Re: How can I connect a remote server from phpmyadmin?

2005-10-12 Thread Ethilien
You need to edit the config.inc.php file in the phpmyadmin directory and set the appropriate server address/username/password information for your remote server. You might have to set a remote server up in cpanel for this to work however. MI SOOK LEE wrote: Hello, I have PhpMyAdmin 2.6.3 , M

[PHP] Re: array_slice and for loop problem

2005-10-12 Thread Ethilien
Are you trying to put each return from array_slice into $output as an array? You need to replace $output = array_slice... with $output[] = array_slice... Also, you cannot just echo an array (even of characters). It must be a string, or else echo will only produce the output 'Array'. Hope thi

[PHP] Possible bug with imagettftext and imageft text when imagealphablending is false

2005-10-12 Thread Ethilien
I have been attempting to write a dynamic text replacement script that would generate transparent PNGs using gd, and it works fine except when one of the characters in a font has parts of it that overhang into the previous characters. You can see what I mean in this test script: The result c

Re: [PHP] Re: preg_match_all question

2005-07-31 Thread Ethilien
Actually, I meant what is an actual example of a link it will match. like text for example. Chris Bruce wrote: It matches any link with the exception of https links. On Jul 20, 2005, at 3:36 PM, Ethilien wrote: I don't see anything in this regex that would prevent https from being ma

[PHP] Re: preg_match_all question

2005-07-20 Thread Ethilien
I don't see anything in this regex that would prevent https from being matched, since you don't specify the pattern of the actual url at all. What is an example of a link that it will match? Chris Bruce wrote: Hello, I am using the following to do link replacing: preg_match_all("/<\s*a\s+[^>

[PHP] Re: mysql problem- I know it isn't strictly php

2005-07-20 Thread Ethilien
That last line always causes me problems, I think it is probably a difference in versions of mysql. Just change the last line to: ); without any of the text in their. It doesn't really do much anyway. Ross wrote: Hi all, I am trying to create a table on the remote server but it never seems t

[PHP] Re: Include path quirks

2005-07-18 Thread Ethilien
Actually, I think I might have found a solution, although its not a very good one. include realpath(dirname(__FILE__) . "/" . "../include/global.php"); Ethilien wrote: I've been attempting to write an application with a bit more ordered directory structure than I nor

[PHP] Include path quirks

2005-07-18 Thread Ethilien
I've been attempting to write an application with a bit more ordered directory structure than I normally use, and I ran into the rather annoying problem with include() where relative paths are only based off of the current working directory, and not that of the included script. This makes it im

[PHP] Re: Tracking a mobile phone

2005-07-18 Thread Ethilien
I think that would require tapping the cellphone network, which I doubt they would let you do since it be a major violation of privacy, because you could track the general location of anyone on their network. Thomas wrote: Hi there, I was wondering if anybody has attempted to track a mobi