Re: [PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
Thanks Michael & Marek! It worked! :) "Michael Sims" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >> OrangeHairedBoy wrote: > >>> I would like to use eval() to evaluate another PHP file and store > >>> the output of that file

Re: [PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
Marek, OK...that worked...kinda, but it doesn't pass the output to $colors. It echos it. I need the output to be passed to $colors. Lewis "Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > OrangeHairedBoy wrote: > > I would like to use

Re: [PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
ce( "Green" , "Orange" , $file ); Lewis "Michael Sims" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > OrangeHairedBoy wrote: > > I would like to use eval() to evaluate another PHP file and store the > > output of that file in a string. >

[PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
I would like to use eval() to evaluate another PHP file and store the output of that file in a string. So, let's say, for example, that I have a file called colors.php which contains this: Colors: Then, in another file, I have this: $file = file_get_contents( "colors.php" ); $colors = eval( $f

Re: [PHP] Flatten/Unflatten arrays

2004-04-19 Thread OrangeHairedBoy
Ah! THANK YOU THANK YOU THANK YOU! I was going insane when I couldn't remember the names of the Perl functions either! :) Lewis "Chris W. Parker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] OrangeHairedBoy <mailto:[EMAIL PROTECTED]> on Monday,

Re: [PHP] House for rent - Good price

2004-04-19 Thread OrangeHairedBoy
And he set the date to 12/7/2165. Can the message be deleted? I hate spam... "Oscar F" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Yeah this is no Real State List. Put up an ad on the newspaper. > > O. > > > Leif K-Brooks wrote: > > > [EMAIL PROTECTED] wrote: > > > >> Hello all

[PHP] Flatten/Unflatten arrays

2004-04-19 Thread OrangeHairedBoy
Hi all, In Perl there is a way to flatten an array into a string, and a matching function to unflatten the array. This is different from explode/implode because the function supports multidimentional arrays as well. The purpose is to be able to write an array to a flatfile, and when necessary, r

[PHP] Find the last friday of each month.

2003-10-26 Thread OrangeHairedBoy
Hi all, I'm trying to write a script to get the next last friday of the month and I am failing miserably. It keeps giving me October 10th. So, I scrapped it. Basically, I just want to show what the last friday of the month is, and if that date has already passed, show the last friday of the next

[PHP] Re: PHP and MySQL bug

2003-01-04 Thread OrangeHairedBoy
You really should be using a $link variable...it's good habit: $link = mysql_connect(...); mysql_select_db( "mydb" , $link); $query = mysql_query( "select..." , $link ); $result = mysql_fetch_array($query); Lewis "Nuno Lopes" <[EMAIL PROTECTED]> wrote in message 003a01c2b3de$95004650$0100a8c0@pc

Re: [PHP] Avoiding Repeat Posts

2003-01-04 Thread OrangeHairedBoy
EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > on 04/01/03 7:26 PM, OrangeHairedBoy ([EMAIL PROTECTED]) wrote: > > > Hi all, > > > > It seems that there might be some basic solution on this that I never > > received a memo on... > > it's been mentioned MA

[PHP] Re: Hello and help

2003-01-04 Thread OrangeHairedBoy
Or to make it easy, here's the line you need: $info = mysql_fetch_array( $result ); Put that line right after the query. So, here's sample: $Link=mysql_pconnect($Host, $User, $Password); $db=mysql_select_db($DBname, $Link); $query=mysql_query("SELECT * from calendar", $Link); $result = mysql_fe

[PHP] Avoiding Repeat Posts

2003-01-04 Thread OrangeHairedBoy
Hi all, It seems that there might be some basic solution on this that I never received a memo on... Basically, I'm looking for a way to avoid repeat posts. If someone, for example, adds something to a bulletin board, clicks submit, and then presses F5, they're just 1 click away from re-submitting

[PHP] Re: REPLY NEEDED

2002-11-19 Thread OrangeHairedBoy
I think I'd rather go with the 126M USD being offered by Desmond West (see email entitled "STRICTLY CONFIDENCIAL") instead of this measly 31.5M USD. If anyone wants to contact the people who own ecplaza.net (for fun), here's the info from whois: Registrant: EC Plaza Network Inc. 1F, Shinho Vil

[PHP] Re: Minutes to hours/days/monthes/years?

2002-11-17 Thread OrangeHairedBoy
OK...I wrote this...is this what you want? return english_time("64925149"); function english_time($minutes) { while ($minutes>=525600) {$years++;$minutes-=525600;} while ($minutes>=1440) {$days++;$minutes-=1440;} while ($minutes>=60) {$hours++;$minutes-=60;} if ($years) { $string[] = ( $years ==

[PHP] Re: Problem whith query in query

2002-11-17 Thread OrangeHairedBoy
MySQL doesn't support queries inside queries. I think it's on their TODO list... SELECT * FROM identifisering as i > WHERE i.identifiseringid=(SELECT MAX(ii.identifiseringid) > FROM identifisering as ii > GROUP BY dprosjekt); "Lars Espelid" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED

[PHP] Re: STRICTLY CONFIDENCIAL

2002-11-17 Thread OrangeHairedBoy
Obviously the "Chief auditor of NED Bank in south africa" must need to be pretty well educated for the job. I can tell by the POS sentence "One hundred and twenty six million United States Dollars million dollars". I'm sorry...how many million United States Dollars million dollars? Right... Not t

[PHP] Re: Calling $PATH_INFO

2002-11-17 Thread OrangeHairedBoy
When you press F5 it's probably resubmitting the contents of the form, including the value of the submit button. You might want to use sessions to control what they submit, and how ofter they submit on the server side. Lewis "Mr. Bungl3" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">ne

[PHP] Re: POSIX and PCRE help

2002-11-17 Thread OrangeHairedBoy
PROTECTED]... > In what case would you have a semi-colon in the string? > > > "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Aaron, > > > > Thanks for the advise, but I'm got a

[PHP] Re: POSIX and PCRE help

2002-11-16 Thread OrangeHairedBoy
ngArray = preg_split('/;/', $string, -1, PREG_SPLIT_NO_EMPTY); > > Then split by the = or : > > // split by = or : > > foreach ($stringArray as $item) { > list($tag, $element) = preg_split('/\:|\=/', $item, 1, > PREG_SPLIT_NO_EMPTY);

Re: [PHP] I'm in need of a PHP web host recommendation

2002-11-15 Thread OrangeHairedBoy
Seems a bit expensive though...$7.95/month for 5megs and 1 email. You could try your-site.com which is $5.00/month for 50megs and 25 email, etc... Or, look at CIHOST.com - the folks I use. Their cheapest unix deal is ~ $15/month for 100megs, 25+email, mysql, etc...mega fast connection too... One

[PHP] Re: session handling

2002-11-15 Thread OrangeHairedBoy
Here's what you need: on page 1.php: on page 2.php: You have to register the variable with the session first so it knows that it's a variable that needs monitored and, when the script finishes, needs saved. Hope this helps! Lewis "Anjali Kaur" <[EMAIL PROTECTED]> wrote in message [EMAIL P

[PHP] POSIX and PCRE help

2002-11-15 Thread OrangeHairedBoy
I am trying to learn more about regular expressions as I haven't used them much in the past. I am working with email, and I'm looking for a way to split the following expression up: Content-Type: text/plain; boundary="whatever"; Using "/^(\S+)\:\s*(.+)$/iU" I can split it into: [Content-Type

Re: [PHP] Re: MySQL Problem

2002-10-03 Thread OrangeHairedBoy
orld"??? ::Lewis "Mike Ford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > -Original Message- > > From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] > > Sent: 03 October 2002 09:39 > > > > He

[PHP] Re: Trouble with understanding arrays

2002-10-03 Thread OrangeHairedBoy
Why don't you just wright your own little debug thing? foreach ($TickersCurrent as $Ticker=>$Value) { print "$Ticker - $Value\n"; } ::Lewis "Christopher J. Crane" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am having problems with arrays. I

[PHP] Re: MySQL Problem

2002-10-03 Thread OrangeHairedBoy
Here's a simplier version...and I'm still having a problem with it. It's driving me insane!!! :) class MySQL { function SET ( ) { $this->MYVAR = "Hello World!"; } function RETREIVE ( ) { print $this->MYVAR; } } $helpme = new MySQL; $helpme->SET; $helpme->RETREIVE; /* Prints NOTHIN

Re: [PHP] Re: MySQL Problem

2002-10-03 Thread OrangeHairedBoy
s sounds a bit over the top, but it works...at least it > O> did...until now. I thought I'd mention the circumstances in case that makes > O> a difference, which I suspect it will. > > O> Thanks again! > > O> Lewis > > O> "Orangehairedboy&q

[PHP] Re: counting number of records in a MySQL table; how do I get the result?

2002-10-03 Thread OrangeHairedBoy
Hi! $result=mysql_query("select count(*) as count from AuthNum"); $a_row=mysql_fetch_object($result); $NumberOfRows=$a_row->count; if ($NumberOfRows) { /* There is at least one row */ } else { /* There are no rows */ } Hope this helps (especially the "as count" part in t

[PHP] Re: MySQL Problem

2002-10-03 Thread OrangeHairedBoy
n the circumstances in case that makes a difference, which I suspect it will. Thanks again! Lewis "Orangehairedboy" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi everyone! I can't figure out why this doesn't work. The ca

[PHP] MySQL Problem

2002-10-03 Thread OrangeHairedBoy
Hi everyone! I can't figure out why this doesn't work. The call to the CONNECT function works and it connects with no problem, and it does save the Resource ID in $this->DBLink[]...however, when CHOOSEDB is called, the Resource ID just saved is gone. $this->DBLink is just empty, and I can't figure

Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy
; <[EMAIL PROTECTED]> wrote in message 3D7FEE06.26058.356643C@localhost">news:3D7FEE06.26058.356643C@localhost... > > > On 12 Sep 2002 at 0:13, OrangeHairedBoy wrote: > > > Yeah...i should have mentioned I had thought of that...but I really > > don't wa

Re: [PHP] Query result to an array

2002-09-11 Thread OrangeHairedBoy
Here's a function I wrote...feel free to use it. It will convert anything into a 2D array. Sample Table: ID Name 1Bob 2Joe 3Eric 4Cody $query="select * from sampletable"; $result=mysql_query($query); $wholetable=ResultToArray($r

[PHP] Re: how can I return several query results per table row?

2002-09-11 Thread OrangeHairedBoy
well, hope about this: $count=0; print ""; while (list($FirstName,$LastName)=mysql_fetch_row($result)) { $count++; if ($count == 4) { $count=0; print "\n"; } print "$FirstName $LastName\n"; } print "\n"; Or something like that...you get the ide

[PHP] Re: Using HTTP Referer

2002-09-11 Thread OrangeHairedBoy
The variable name is just $HTTP_REFERER. Some others are: $HTTP_USER_AGENT, $REMOTE_ADDR, $REMOTE_HOST, $QUERY_STRING, and $PATH_INFO. There's more which you can find by looping through the globals array: foreach ($GLOBALS as $key=>$value) { print "\$GLOBALS[\"$key\"] == $value\n"; } Hope this

Re: [PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy
[EMAIL PROTECTED]... > could you change the "<" to "<" or "%3C" or something similar? > > -Original Message- > From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 1:59 PM > To: [EMAIL PROTECTED] > Su

[PHP] Re: refresh function?

2002-09-11 Thread OrangeHairedBoy
That's actually an HTML function. Just insert this in the ... tags: If you want it to refresh itself, use: In either case, replace "2" with the number of seconds to wait from the time the page finishes loading before refreshing. Lewis "Peter" <[EMAIL PROTECTED]> wrote in message [EMAIL P

[PHP] XML Parser Question

2002-09-11 Thread OrangeHairedBoy
I've been reading the XML parser documention, and I'm not having much luck. I want to be able to handle the tag , but the parser keeps telling me that it's not formed correctly (because of the "<" in the quotes). But shouldn't it ignore that as a tag-opening "<" since it's inside quotes?? Anyway,

Re: [PHP] PHP Source files

2002-09-09 Thread OrangeHairedBoy
expressions > are processed I have no idea. I bet they know in the php-dev mailing > list though, you might want to try there. > > Adam Voigt > [EMAIL PROTECTED] > > On Mon, 2002-09-09 at 12:55, OrangeHairedBoy wrote: > > No, but that's ok... > > > > What

Re: [PHP] PHP Source files

2002-09-09 Thread OrangeHairedBoy
Schroebel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > From: OrangeHairedBoy [mailto:[EMAIL PROTECTED]] > > Sent: Monday, September 09, 2002 12:41 PM > > Subject: [PHP] PHP Source files > > > > I'm wonderin

Re: [PHP] PHP Source files

2002-09-09 Thread OrangeHairedBoy
(assuming $c has a value) which means that it couldn't > be greater, however it could be >= if $c was 0. > > Adam Voigt > [EMAIL PROTECTED] > > On Mon, 2002-09-09 at 12:40, OrangeHairedBoy wrote: > > I'm wondering if anyone knows where I can find information ab

[PHP] PHP Source files

2002-09-09 Thread OrangeHairedBoy
I'm wondering if anyone knows where I can find information about how PHP parser processes commands like: $a=$b+$c; if ($b < $a) {} (Ones with operators) I've downloaded the source code, but I'm having much luck narrowing down my search. Can anyone help me?? Thanks! -- PHP General Mailing L