Used in conjunction with classes.
class Foo
{
var bar;
function Foo($bar)
{
$this->bar = $bar;
}
}
$foo = new Foo("foobar");
echo $foo->bar; // "foobar"
For interests sake here's the same in C++ (correct me if I'm wrong it's been
a long time s
I can't believe I just sent this. For those who care it's the other way
around.
-Original Message-----
From: Douglas Maclaine-cross
Sent: Monday, March 04, 2002 14:08
To: 'PHP'; [EMAIL PROTECTED]
Subject: RE: [PHP] Need help with a PHP script
echo "T".$use
echo "T".$username.$password;
is PHP 2 and earlier proper syntax for PHP 3+ is
echo "T"+$username+$password;
or
echo "T$username$password";
Doug
Use single quotes? I think that stops it from interpreting the regular
expression before hand.
-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:32
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: regular expressions
yeah! remember that php
Ming! http://www.php.net/manual/en/function.swfmovie.php
Don't make the mistake I made and overlook what Flash Action Script is
capable of though.
Doug
-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 12:43
To: [EMAIL PROTECTED]
Sub
I don't know about preg but how about this monster?
$str = "I'm okay now aren't I. Do I work? 'mm";
while(eregi(' [a-z\']{1,3} ', $str))
$str = eregi_replace(' [a-z\']{1,3} ', ' ', $str);
while(eregi(' [a-z\']{1,3}([^a-z\' ])', $str))
$str = eregi_replace(' [a-z\']{1,3}([^a-z\
$string = ereg_replace("[A-Za-z']{1,3}", "", $string); // don't forget "I'm"
I haven't checked but something like this.
-Original Message-
From: Michael Kimsal [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:59
To: [EMAIL PROTECTED]
Subject: [PHP] Regex function needed
Lo
Or an even simpler str_replace("\n", "", $sourcestring);
-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 30, 2002 15:14
To: 'Jon'; [EMAIL PROTECTED]
Subject: RE: [PHP] Swapping for \n... ?
> I'm processing a form but all the functions I've foun
$news = mysql_query("select * from bookmarks ORDER by TNum,AU asc");
$old_TNum = "";
while ($mydata = mysql_fetch_object($news))
{
$new_TNum = $mydata->TNum;
if ($new_TNum != $old_TNum) #when TNum occurs the first time, echo it once
only.
{
$old_TNum = $new_TNum;
$body .= "".$temp.":
9 matches
Mail list logo