You are here: Re: returning an array from a function « PHP Programming Language « IT news, forums, messages
Re: returning an array from a function

Posted by Ivαn Sαnchez Ortega on 05/26/06 09:31

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris wrote:

> I am calling the function like this :
>
> $BrokenArray = array();
> $BrokenArray = $this->fileTree($this->ProjectRoot,".c");
>
> foreach (($this->fileTree($this->ProjectRoot,".c")) as $wibble)
> {
> print "Broken Array : $wibble <br>\n";
> }

Debug that by using var_dump or print_r :

$BrokenArray = array();
$BrokenArray = $this->fileTree($this->ProjectRoot,".c");
var_dump($BrokenArray);


By the way, remember that PHP is a dinammically-typed language: $BrokenArray
is an array at first, but if you assign it a value of other type (an
integer, for example), it becomes that type.

- --
- ----------------------------------
IvΓ‘n SΓ‘nchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

There may still be two superpowers on the planet: the United States and
world public opinion.
-- Patrick Tyler
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEdqDC3jcQ2mg3Pc8RAqiuAJ9lALLpM6imxVP5J9Zvn6nibiK3BgCcDlyI
QilzLASAx7ZZrIoe7S5mkB4=
=bi1H
-----END PGP SIGNATURE-----

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация