[PHP] What does this mean?

2009-06-26 Thread Jason Carson
Hey all, I'm new to the list and I have a question...

What does = mean?

The book I am reading is called Programming PHP published by O'Reilly. I
haven't read the whole book yet. I was flipping through the pages and in
the book there is mention of = (less than or equal) and = (greater than
or equal)but it doesn't say what = is even though it is used numerous
times in the example code.

Thanks

Jason




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fwd: [PHP] What does this mean?

2009-06-26 Thread Eddie Drapkin
Just getting this back on the list .


-- Forwarded message --
From: Eddie Drapkin oorza...@gmail.com
Date: Fri, Jun 26, 2009 at 2:36 AM
Subject: Re: [PHP] What does this mean?
To: Jason Carson ja...@jasoncarson.ca


It's used in key value combinations in several places.

When building an array:
$foo = array('key' = 'value', 'another_key' = 'another value');
which will give you an array that looks like
$foo['key'] = 'value';
$foo['another_key'] = 'another_value';

Also, in foreach(), which is a language construct used to iterate over arrays:

foreach($foo as $key = $val) {
 echo The key for this element is $key and the value is $val\n;
}
will output:
The key for this element is key and the value is value
The key for this element is another_key and the value is another_value

Those are the two most common places you'll see it (and perhaps the
only, I don't want to speak conclusively, though, I'm awfully tired
this evening!)

On Fri, Jun 26, 2009 at 2:31 AM, Jason Carsonja...@jasoncarson.ca wrote:
 Hey all, I'm new to the list and I have a question...

 What does = mean?

 The book I am reading is called Programming PHP published by O'Reilly. I
 haven't read the whole book yet. I was flipping through the pages and in
 the book there is mention of = (less than or equal) and = (greater than
 or equal)but it doesn't say what = is even though it is used numerous
 times in the example code.

 Thanks

 Jason




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] What does this mean: ?=

2006-04-08 Thread Merlin

Hi there,

I am somehow confused about the this command: ?=

What does the equetion sigh mean?

I would like to replace the ?= sign inside this line:


?= $ajax-loadJsApp(true) ?

so I could do something like this:
?php
$ajax-loadJsApp(true);
echo 'test';
?

But this does not work. Some how this equetion sign has something to do with it.

Thank you for any hint,

Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What does this mean: ?=

2006-04-08 Thread Rory Browne
?=expression ?

?php echo expression; ?

On 4/8/06, Merlin [EMAIL PROTECTED] wrote:

 Hi there,

 I am somehow confused about the this command: ?=

 What does the equetion sigh mean?

 I would like to replace the ?= sign inside this line:


  ?= $ajax-loadJsApp(true) ?

 so I could do something like this:
 ?php
  $ajax-loadJsApp(true);
  echo 'test';
 ?

 But this does not work. Some how this equetion sign has something to do
 with it.

 Thank you for any hint,

 Merlin

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] What does this mean: ?=

2006-04-08 Thread Dave Goodchild
?= $arse; ?

...is a concise, if less readable way, to echo the value of arse. It is only
used to echo a value. To do anything else, for example, call a method, use
the second approach you describe. In fact, you already seem to know the
difference, so why the question? Are you trying to replace this notation in
exisiting code?

On 08/04/06, Merlin [EMAIL PROTECTED] wrote:

 Hi there,

 I am somehow confused about the this command: ?=

 What does the equetion sigh mean?

 I would like to replace the ?= sign inside this line:


  ?= $ajax-loadJsApp(true) ?

 so I could do something like this:
 ?php
  $ajax-loadJsApp(true);
  echo 'test';
 ?

 But this does not work. Some how this equetion sign has something to do
 with it.

 Thank you for any hint,

 Merlin

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




--
http://www.web-buddha.co.uk
dynamic web programming from Reigate, Surrey UK

look out for e-karma, our new venture, coming soon!


[PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Chris
I'm trying to understand function definitions and can't seem to find any 
reference to the meaning of (PHP 4 = 4.0.1, PHP 5) or variations there of, 
shown at the beginning of each definition. I get the idea it is telling me 
that the particular function is supported in PHP 4  5. But what does the = 
mean? Also what is this line of the definition called (i.e. version support, 
edited ???)

thanks,
cw 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Erin Fortenberry
= is greater or equal to

-Erin
 

 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED] 
 Sent: Monday, January 09, 2006 9:13 PM
 To: php-general@lists.php.net
 Subject: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)
 
 I'm trying to understand function definitions and can't seem 
 to find any reference to the meaning of (PHP 4 = 4.0.1, PHP 
 5) or variations there of, shown at the beginning of each 
 definition. I get the idea it is telling me that the 
 particular function is supported in PHP 4  5. But what does 
 the = mean? Also what is this line of the definition called 
 (i.e. version support, edited ???)
 
 thanks,
 cw 
 
 --
 PHP General Mailing List (http://www.php.net/) To 
 unsubscribe, visit: http://www.php.net/unsub.php
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Chris
So it means the function was introduced in version 4.01?

Erin Fortenberry [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 = is greater or equal to

 -Erin


 -Original Message-
 From: Chris [mailto:[EMAIL PROTECTED]
 Sent: Monday, January 09, 2006 9:13 PM
 To: php-general@lists.php.net
 Subject: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

 I'm trying to understand function definitions and can't seem
 to find any reference to the meaning of (PHP 4 = 4.0.1, PHP
 5) or variations there of, shown at the beginning of each
 definition. I get the idea it is telling me that the
 particular function is supported in PHP 4  5. But what does
 the = mean? Also what is this line of the definition called
 (i.e. version support, edited ???)

 thanks,
 cw

 --
 PHP General Mailing List (http://www.php.net/) To
 unsubscribe, visit: http://www.php.net/unsub.php

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

2006-01-09 Thread Ligaya Turmelle

Pretty much

Chris wrote:

So it means the function was introduced in version 4.01?

Erin Fortenberry [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]



= is greater or equal to


-Erin




-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Monday, January 09, 2006 9:13 PM
To: php-general@lists.php.net
Subject: [PHP] what does this mean? (PHP 4 = 4.0.1, PHP 5)

I'm trying to understand function definitions and can't seem
to find any reference to the meaning of (PHP 4 = 4.0.1, PHP
5) or variations there of, shown at the beginning of each
definition. I get the idea it is telling me that the
particular function is supported in PHP 4  5. But what does
the = mean? Also what is this line of the definition called
(i.e. version support, edited ???)

thanks,
cw

--
PHP General Mailing List (http://www.php.net/) To
unsubscribe, visit: http://www.php.net/unsub.php







--

life is a game... so have fun.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] what does this mean?

2005-02-25 Thread Diana Castillo

on which page of php.net can I find out what this code does?
$a  = $b? $a :dian;
-- 
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 Ext 216
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean?

2005-02-25 Thread Jason Barnett
Leif Gregory wrote:
 Hello Diana,
 
 Friday, February 25, 2005, 7:07:29 AM, you wrote:
 D on which page of php.net can I find out what this code does?
 D $a  = $b? $a :dian;
 
 
 It's called a ternary operator, basically an if-else statement.

Note to self: write ternary on the blackboard 100 times.

Yep, it's just a fancy if-else statement.


-- 
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-generalw=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHPsubmitform=Find+search+plugins


signature.asc
Description: OpenPGP digital signature


Re: [PHP] what does this mean?

2005-02-25 Thread Jochem Maas
Diana Castillo wrote:
on which page of php.net can I find out what this code does?
$a  = $b? $a :dian;
its a form of if statement called the tertiary form (or something),
it does exactly the same as this:
if ($b) {
$a = $a;
} else {
$a = dian;
}
don't know which page its on tho ;-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what does this mean?

2005-02-25 Thread Leif Gregory
Hello Diana,

Friday, February 25, 2005, 7:07:29 AM, you wrote:
D on which page of php.net can I find out what this code does?
D $a  = $b? $a :dian;


It's called a ternary operator, basically an if-else statement.

There really isn't a page (that I've found) that explains in on
php.net, but check out the user contributed notes on this page.

http://us4.php.net/manual/en/control-structures.alternative-syntax.php



-- 
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.0.2.3 Rush under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] what does this mean?

2005-02-25 Thread Jay Blanchard
[snip]
on which page of php.net can I find out what this code does?
$a  = $b? $a :dian;
[/snip]


It is a ternary IF statement...verbose

if ($a = $b){
$a;
} else {
dian;
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean?

2005-02-25 Thread Jochem Maas
Jason Barnett wrote:
Leif Gregory wrote:
Hello Diana,
Friday, February 25, 2005, 7:07:29 AM, you wrote:
D on which page of php.net can I find out what this code does?
D $a  = $b? $a :dian;
It's called a ternary operator, basically an if-else statement.

Note to self: write ternary on the blackboard 100 times.
I thought 'tertiary' also - I could remember the 'other' name...
I was under the impression that both names were valid..
anyone know if this is true? google brings up relevant hits for
both, from what I gather ternary is more correct.
Yep, it's just a fancy if-else statement.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what does this mean?

2005-02-25 Thread Guillermo Rauch
Including more than one you can make a complex control structure, not
just if else

$a = ($a == 0) ? ($b  $a ) ? $b : $a :$c;


On Fri, 25 Feb 2005 13:26:51 -0600, Jay Blanchard
[EMAIL PROTECTED] wrote:
 [snip]
 on which page of php.net can I find out what this code does?
 $a  = $b? $a :dian;
 [/snip]
 
 It is a ternary IF statement...verbose
 
 if ($a = $b){
 $a;
 } else {
 dian;
 }
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] what does this mean?

2005-02-25 Thread Chris W. Parker
Jochem Maas mailto:[EMAIL PROTECTED]
on Friday, February 25, 2005 12:31 PM said:

 I thought 'tertiary' also - I could remember the 'other' name...
 I was under the impression that both names were valid..
 anyone know if this is true? google brings up relevant hits for
 both, from what I gather ternary is more correct.

Ternary: http://www.answers.com/ternary
Tertiary: http://www.answers.com/tertiary

I think the confusion lies in that they both have the word three in
their definition. But clearly ternary is the correct term.

It's like there, their, and they're. Some people just never get it
right. And there's your and you're too. Oh and to too. I think I'm
thoroughly through at this point.



Chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean?

2005-02-25 Thread Leif Gregory
Hello Jason,

Friday, February 25, 2005, 12:42:30 PM, you wrote:
J Note to self: write ternary on the blackboard 100 times.

You're telling me. I knew what it was but it took me like five minutes
to remember what it was called! grin



-- 
Leif (TB lists moderator and fellow end user).

Using The Bat! 3.0.2.3 Rush under Windows XP 5.1
Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [php] What does PHP mean?

2004-11-22 Thread John Taylor-Johnston
I'm writing an article where I'm going to explain what PHP is in a short 
sentence.
PHP once meant Personal Home Page, right?

PHP, originally an anacronym for Personal Home Page, is a textual, 
general-purpose scripting language (www.PHP.net) designed to collect and 
process data between HTML pages and the Internet.

Any objections? There was an article someplace about Rasmus Lerdorf calling it 
such, in the beginning. (http://www.php.net/manual/en/history.php)

(recursive acronym for PHP: Hypertext Preprocessor)

»» This is the general group. It is a general question? :)

--
John Taylor-Johnston
-
If it's not Open Source, it's Murphy's Law.

  °v°   Bibliography of Comparative Studies in Canadian, Québec and Foreign 
Literatures
 /(_)\  Université de Sherbrooke
  ^ ^   http://compcanlit.ca/ T: 819.569.2064

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] [php] What does PHP mean?

2004-11-22 Thread John Holmes
John Taylor-Johnston wrote:
I'm writing an article where I'm going to explain what PHP is in a short 
sentence.
PHP once meant Personal Home Page, right?
PHP, originally an anacronym for Personal Home Page, is a textual, 
general-purpose scripting language (www.PHP.net) designed to collect and process data 
between HTML pages and the Internet.
Any objections? There was an article someplace about Rasmus Lerdorf calling it 
such, in the beginning. (http://www.php.net/manual/en/history.php)
(recursive acronym for PHP: Hypertext Preprocessor)
PHP/FI stands for Personal Home Page / Forms Interpreter and PHP 
stands for PHP: Hypertext Preprocessor... all of which is explained on 
the page you linked to... :/

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] what does this mean?

2004-03-10 Thread Harry Wiens
$this-styles['shadow'] = (boolean)$bool;


what does (boolean)$bool mean?

mfg.
harry wiens

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean?

2004-03-10 Thread Raditha Dissanayake
The () operator means 'cast into' so

(boolean)$bool means cast this into a booolean. 



Harry Wiens wrote:

$this-styles['shadow'] = (boolean)$bool;
   
what does (boolean)$bool mean?

mfg.
harry wiens
 



--
Raditha Dissanayake.
---
http://www.radinks.com/upload/ 
Drag and Drop Upload thousands of files and folders in a single
transfer.  (HTTP or FTP) 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] what does this mean?

2004-03-10 Thread Richard Davey
Hello Harry,

Wednesday, March 10, 2004, 12:55:44 PM, you wrote:

$this-styles['shadow'] = (boolean)$bool;
HW what does (boolean)$bool mean?

It's casting the value ($bool) to a boolean (i.e. TRUE or FALSE).

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] what does this mean?

2004-03-10 Thread Miguel J. Jimnez
That's a boolean casting; used for forcing a variable to become 
boolean... Hope it helps...

Harry Wiens wrote:

$this-styles['shadow'] = (boolean)$bool;
   
what does (boolean)$bool mean?

mfg.
harry wiens
 

--
Miguel J. Jiménez
ISOTROL, S.A. (Área de Internet)
Avda. Innovación nº1, 3ª - 41020 Sevilla (ESPAÑA)
[EMAIL PROTECTED]
TLFNO. 955036800 ext. 111
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] what does this mean in plain english?

2002-05-17 Thread Jeff Field

Hi. I'm fairly new to PHP and programming in general.  I'm learning mostly
by deconstructing what others have written...but even though I have plenty
of PHP books and have searched the Internet high and low, I'm stumped by the
exact meaning in the following function of what the question mark's (?)
and colon's (:), mean and do?

BTW, I'm not looking for an explanation of the function; just what the
question mark's and colon's mean in plain english, so I'll know how to use
them in other places.  Thanks!

Jeff

--
function GetSQLValueString($theValue, $theType)
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
case text:
  $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
  break;
case int:
  $theValue = ($theValue != ) ? intval($theValue) : NULL;
  break;
  }
  return $theValue;
}
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Stuart Dallas

On 17 May 2002 at 12:23, Jeff Field wrote:
   $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;

It's a shortened version of the if...else construct. As in...

condition ? this_if_true : this_if_false

-- 
Stuart

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Analysis Solutions

On Fri, May 17, 2002 at 12:23:45PM -0500, Jeff Field wrote:
 I'm stumped by the
 exact meaning in the following function of what the question mark's (?)
 and colon's (:), mean and do?

That's the ternary comparison operator.  See 
http://www.php.net/manual/en/language.operators.comparison.php, then 
scroll down under the top table.

 $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

For explanation, allow me to change this a tad...

 $newValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

So, in english...

If magic quotes gpc is off, set $newValue to addslashes($theValue).
If magic quotes gpc is NOT off, set $newValue to plain old $theValue.

--Dan

-- 
   PHP classes that make web design easier
SQL Solution  |   Layout Solution   |  Form Solution
sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Adrian Murphy

The ? in this senario is called the ternary operator
basically shorthand for an if/else statement e.g

$theValue = ($theValue != ) ? ' . $theValue . ' :NULL;

is the equivalent of

if($theValue != ) {
$theValue =$theValue ;
}
else{
$theValue =NULL;
}

- Original Message -
From: Jeff Field [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 17, 2002 6:23 PM
Subject: [PHP] what does this mean in plain english?


 Hi. I'm fairly new to PHP and programming in general.  I'm learning mostly
 by deconstructing what others have written...but even though I have plenty
 of PHP books and have searched the Internet high and low, I'm stumped by
the
 exact meaning in the following function of what the question mark's (?)
 and colon's (:), mean and do?

 BTW, I'm not looking for an explanation of the function; just what the
 question mark's and colon's mean in plain english, so I'll know how to use
 them in other places.  Thanks!

 Jeff

 --
 function GetSQLValueString($theValue, $theType)
 {
   $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) :
$theValue;

   switch ($theType) {
 case text:
   $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
   break;
 case int:
   $theValue = ($theValue != ) ? intval($theValue) : NULL;
   break;
   }
   return $theValue;
 }
 --


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] What does PL mean?

2002-03-18 Thread Dan Vande More

What does the pl mean in 4.0.4-pl1
And 4.0.3 pl1?
And 4.0.1-pl2 and so on and so forth?

Thanks

Dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] What does PL mean?

2002-03-18 Thread mnc

On Mon, 18 Mar 2002, Dan Vande More wrote:
 What does the pl mean in 4.0.4-pl1
 And 4.0.3 pl1?
 And 4.0.1-pl2 and so on and so forth?

Patch level.

Like a minor version.

miguel


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] What does PL mean?

2002-03-18 Thread Dan Vande More

Thanks miguel

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 18, 2002 5:14 PM
To: Dan Vande More
Cc: PHP-GENERAL
Subject: Re: [PHP] What does PL mean?

On Mon, 18 Mar 2002, Dan Vande More wrote:
 What does the pl mean in 4.0.4-pl1
 And 4.0.3 pl1?
 And 4.0.1-pl2 and so on and so forth?

Patch level.

Like a minor version.

miguel

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] What does var mean ?

2001-11-22 Thread Girish Nath

Hi

I've been looking at some classes an have come across this notation for
example :

function remove($productid) {
/* this function will remove a given product from the cart */
if (isset($productid)) {
unset($this-items[$productid]);
}
}


What does the  (ampersand) before the variable name mean ?

Thanks


Girish


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What does var mean ?

2001-11-22 Thread Girish Nath

Thanks, you guys rock! :)

Girish

- Original Message -
From: Roberto Ramírez [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 4:10 PM
Subject: RE: [PHP] What does var mean ?


The use of the  means that its passed by reference.

That its equal to the memory address of where the variable is stored

$variable

its often used to modify the value of a that variable within a function.

for example:

?php

$variable = 3;
echo $variable;
#will print 3

function checkit($x){
$x = 5;
#this will modify the value of $variable.
}

checkit($variable);

echo $variable;
#will print 5
?

PROSSES, Roberto Ramírez.

Tel-Fax. 8115 3197 y 99
Puerto No. 3425 Col. Riberas del Río CP. 67160 Guadalupe, Nuevo León.
México.

Visítanos aquí:http://www.prosses.com
http://www.prosses.com Correo electrónico:  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]



-Mensaje original-
De: Girish Nath [mailto:[EMAIL PROTECTED]]
Enviado el: Jueves, 22 de Noviembre de 2001 09:43 a.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP] What does var mean ?


Hi

I've been looking at some classes an have come across this notation for
example :

function remove($productid) {
/* this function will remove a given product from the cart */
if (isset($productid)) {
unset($this-items[$productid]);
}
}


What does the  (ampersand) before the variable name mean ?

Thanks


Girish


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Tr: [PHP] What does var mean ?

2001-11-22 Thread Nayco_IUT Laroche


- Original Message -
From: Nayco_IUT Laroche [EMAIL PROTECTED]
To: Girish Nath [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 4:59 PM
Subject: Re: [PHP] What does var mean ?


 This is a reference to the variable, that means that it extends the scope
of
 this variable into the function, ie, you can modify this variable inside
the
 function ... OK, OK, my english is bad so maybe you didn't understand
 anything  Well, I tried ;~) !!!
 In fact, var is THE ADDRESS of var 

 - Original Message -
 From: Girish Nath [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, November 22, 2001 4:43 PM
 Subject: [PHP] What does var mean ?


  Hi
 
  I've been looking at some classes an have come across this notation for
  example :
 
  function remove($productid) {
  /* this function will remove a given product from the cart */
  if (isset($productid)) {
  unset($this-items[$productid]);
  }
  }
 
 
  What does the  (ampersand) before the variable name mean ?
 
  Thanks
 
 
  Girish
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What does var mean ?

2001-11-22 Thread J Smith

Bas Jobsen wrote:

 What does the  (ampersand) before the variable name mean ?
 
 a pointer to the address (mem) of the variable

PHP doesn't have pointers and memory can't be directly accessed this way 
like you can in C, or C++ or whatever. The ampersand is for passing values 
via reference rather than value. PHP has no notion of pointers.

J

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What does var mean ?

2001-11-22 Thread Nayco_IUT Laroche

Ouupppss!!
You're right !!!

- Original Message -
From: J Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, November 22, 2001 6:43 PM
Subject: Re: [PHP] What does var mean ?


 Bas Jobsen wrote:

  What does the  (ampersand) before the variable name mean ?
 
  a pointer to the address (mem) of the variable

 PHP doesn't have pointers and memory can't be directly accessed this way
 like you can in C, or C++ or whatever. The ampersand is for passing values
 via reference rather than value. PHP has no notion of pointers.

 J

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What does var mean ?

2001-11-22 Thread Philip Olson


 What does the  (ampersand) before the variable name mean ?

It's called a reference, check out:

  http://www.php.net/manual/en/language.references.php

regards,
Philip Olson


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] what does this mean?

2001-09-24 Thread Jay Paulson

Warning: Cannot use a scalar value as an array

what does that mean?

i have in my code this:

$errorMsg[error] = ;

thanks,
jay


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] what does this mean?

2001-09-24 Thread Mark Roedel

 -Original Message-
 From: Jay Paulson [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 24, 2001 3:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] what does this mean?
 
 
 Warning: Cannot use a scalar value as an array
 what does that mean?
 
 i have in my code this:
 $errorMsg[error] = ;

It means, in this case, that it doesn't think that $errorMsg is an
array.

And that, in turn, makes me think that you've probably already done
something with the $errorMsg variable...perhaps assigned it a string
value?


---
Mark Roedel |  Blessed is he who has learned to laugh
Systems Programmer  |   at himself, for he shall never cease
LeTourneau University   |   to be entertained.
Longview, Texas, USA|   -- John Powell 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] what does this mean?

2001-09-24 Thread recognize

As far as I know, you've defined $errorMsg previously 
as an variable, not as an array. If you'll not use 
anymore the previously defined $errorMsg just unset the 
variable using unset($errorMsg) before the 
attribution.

I hope this solves your problem, it solved a lot of 
similar errors to me!

Greetings,

Manuel Silva

Quoting Jay Paulson [EMAIL PROTECTED]:

 Warning: Cannot use a scalar value as an array
 
 what does that mean?
 
 i have in my code this:
 
 $errorMsg[error] = ;
 
 thanks,
 jay
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 
 

-
Visite http://www.lusoweb.pt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] What Does This Mean?

2001-02-13 Thread Ben Ocean

Hi;
I'm getting this error:
 
Unsatisfied dependencies for mod-php3-mysql-3.0.8-2: mod-php3 = 3.0.8

What does it mean and what should I do about it (if anything)?
TIA,
BenO


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] What Does This Mean?

2001-02-13 Thread Ankur Verma

I am not very sure of what exactly does this this mean but I guess that the
particular module that you are installing requires a cversion of PHP that
has to be greater than 3.0.8.

This is just a guess. I aplogize if it's wrong.

regards

Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India


- Original Message -
From: "Ben Ocean" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 13, 2001 3:28 PM
Subject: [PHP] What Does This Mean?


 Hi;
 I'm getting this error:
  
 Unsatisfied dependencies for mod-php3-mysql-3.0.8-2: mod-php3 = 3.0.8
 
 What does it mean and what should I do about it (if anything)?
 TIA,
 BenO


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] What Does This Mean?

2001-02-12 Thread Ben Ocean

Hi;
I just ran into the following error while doing maintenance on my RedHat box:
 
Unsatisfied dependencies for mod-php3-mysql-3.0.8-2: mod-php3 = 3.0.8

What does this mean and how do I fix it?
TIA,
BenO


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]