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
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
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.
>
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
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,
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
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
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
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
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
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
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
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
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 ==
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
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
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
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
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);
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
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
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
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
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
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
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
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
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
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
; <[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
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
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
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
[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
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
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,
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
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
(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
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
40 matches
Mail list logo