AIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 3:11 PM
Subject: Re: [PHP] Passing Array to object
> function DisplayLinks($links,$names)
> {
> $namecount = sizeof($names);
> for($a=0;$a<$namecount;$a++)
> {
> $name = $names[$a];
>
to the names array
and links to the links array...
I know this isnt pretty but it should work
- Original Message -
From: "Daniel J. Rychlik" <[EMAIL PROTECTED]>
To: "Chris Sherwood" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003
o: "Daniel J. Rychlik" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 1:46 PM
Subject: Re: [PHP] Passing Array to object
> hmmm okay
> cause list works by assigning elements in order from an array
> each iterates thru each element in a list so
ROTECTED]>
To: "Daniel J. Rychlik" <[EMAIL PROTECTED]>; "Chris Sherwood"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 11:17 AM
Subject: Re: [PHP] Passing Array to object
> Its erroring at my display links function. This func
At 20:17 25.06.2003, Daniel J. Rychlik said:
[snip]
>
>Its erroring at my display links function. This function is inside my main
>class.
>
>function DisplayLinks($links) {
>
>while(list($name, $url) = each($links) {
>
>echo ":::$name
wont work... I even try assigning $links to the array.
- Original Message -
From: "Daniel J. Rychlik" <[EMAIL PROTECTED]>
To: "Chris Sherwood" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 1:08 PM
Subject: Re: [PHP] Pas
You define a function "SetLinks", but call it as "SetLink" -- is this a
typo? Also, neither of your SetLink/s() calls are correct function calls.
This may work better:
$index->SetLinks(array(...));
-
michal migurski- cont
t; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 1:02 PM
Subject: Re: [PHP] Passing Array to object
> Have you tried to assign the array to a variable then pass the variable to
> the function ie
>
> $index = new main();
> $yourva
ROTECTED]>
Sent: Wednesday, June 25, 2003 10:46 AM
Subject: [PHP] Passing Array to object
Hello,
I am developing a site that uses classes to reuse code and objects.
I have in my main class a
function SetLinks($newlinks) {
$this->links = $newlinks;
}
And another function that disp
Hello,
I am developing a site that uses classes to reuse code and objects.
I have in my main class a
function SetLinks($newlinks) {
$this->links = $newlinks;
}
And another function that displays them in the same class main {
I have another file called index.php that basically just pa
10 matches
Mail list logo