On Jan 16, 2008 6:32 PM, Stijn Leenknegt [EMAIL PROTECTED] wrote:
Hello
I've an idea for PHP6. Let's kickoff with an example.
?php
$info = getUserInformation($id); //return an array with all the
information
of an user.
echo $info['naam'];
?
This is nice, but when I want one element of
On Jan 16, 2008 6:32 PM, Stijn Leenknegt [EMAIL PROTECTED] wrote:
Hello
I've an idea for PHP6. Let's kickoff with an example.
?php
$info = getUserInformation($id); //return an array with all the information
of an user.
echo $info['naam'];
?
This is nice, but when I want one element of
Jim Lucas wrote:
I think this would be an easier/quicker fix for you then requesting that
the PHP developers re-write a large portion of the way PHP currently works.
Here is the reference that I have been looking for.
http://en.wikipedia.org/wiki/Message_passing
Jim
--
PHP General Mailing
Hello
I've an idea for PHP6. Let's kickoff with an example.
?php
$info = getUserInformation($id); //return an array with all the information
of an user.
echo $info['naam'];
?
This is nice, but when I want one element of the returned array, I have to
store the returned array into a variable and
On Wed, January 16, 2008 5:32 pm, Stijn Leenknegt wrote:
I've an idea for PHP6. Let's kickoff with an example.
This belongs on php-internals...
?php
echo getUserInformation($id)['naam'];
?
where it has already been discussed at length, and, as I recall,
rejected as too obfuscated for the
I think this would be an easier/quicker fix for you then requesting that
the PHP developers re-write a large portion of the way PHP currently works.
?php
function i($arr, $i) {
return $arr[$i];
}
echo i(getUserInformation($id), 'naam');
#or
echo i($object-fetchObjects(), 0)-method();
Stijn Leenknegt wrote:
This is nice, but when I want one element of the returned array, I
have to store the returned array into a variable and then call the
variable. The next code example is my idea.
?php
echo getUserInformation($id)['naam'];
?
Let's look further then this small
Hi,
I just wanted to know if it is wrong, or non-standard, for me to set-up
functions that just return an array... example:
function vert_links_array():
function vert_links_array() {
return array(
'1' =
array(S_MANCOM,'start.php?page=productsamp;
On Mar 21, 2006, at 2:35 PM, Michael Hulse wrote:
Any suggestions? I am a self-taught php dude, so please don't laugh if
this is a silly question.
You know, the more I think about, the more I think I need to learn
about PHP classes... Seems like I would just be able to define the
array from
On Mar 21, 2006, at 3:48 PM, Michael Hulse wrote:
... any good links for learning more about classes?
This seems like a good tutorial to start with:
http://www.phpfreaks.com/tutorials/48/0.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
How do I get a function to return an array? This code doesn't work:
function getData() {
function builds the array $theArray - tested ok
return $theArray;
}
Any help on the syntax would be appreciated.
Cheers
Leonie
--
PHP General Mailing List (http://www.php.net/)
To
Hi,
Monday, September 8, 2003, 11:54:10 AM, you wrote:
L How do I get a function to return an array? This code doesn't work:
L function getData() {
L function builds the array $theArray - tested ok
L return $theArray;
L }
L Any help on the syntax would be appreciated.
L Cheers
L
Nothing. But it I run:
function getData() {
etc..
print_r ($theArray);
return $theArray;
}
the data is definitely there.
I should add that the function is within a class so it is like this:
class excel_com {
(all tested - it works well)
function getData() {
etc..
Hi,
Monday, September 8, 2003, 12:16:47 PM, you wrote:
L Nothing. But it I run:
L function getData() {
L etc..
L print_r ($theArray);
L return $theArray;
L }
L the data is definitely there.
L I should add that the function is within a class so it is like this:
L class excel_com {
Nothing. But it I run:
function getData() {
etc..
print_r ($theArray);
return $theArray;
}
the data is definitely there.
I think the example in the PHP manual goes something like...
function getData () {
// blah, blah
return array ('value1', 'value2', ...);
}
Then you would call it
I would use foreach instead of for, your function does not guarantie
checking all elements and also checks elements that might not have been set.
pei_world wrote:
I want to use the following function the test the array elements,
if all element is number return true, otherwise false;
but the
I want to use the following function the test the array elements,
if all element is number return true, otherwise false;
but the command marked, it print out only the first char of every strings in
the array;
can help?
ie: ++0++ for 0.234
function check_int_float($array){
$result=true;
- Original Message -
From: pei_world [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 4:30 PM
Subject: [PHP] function for $array
I want to use the following function the test the array elements,
if all element is number return true, otherwise false
18 matches
Mail list logo