Re: [PHP] Passing Array to object

2003-06-25 Thread Daniel J. Rychlik
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]; >

Re: [PHP] Passing Array to object

2003-06-25 Thread Chris Sherwood
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Daniel J. Rychlik
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Chris Sherwood
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Ernest E Vogelsinger
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Daniel J. Rychlik
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Mike Migurski
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Daniel J. Rychlik
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

Re: [PHP] Passing Array to object

2003-06-25 Thread Chris Sherwood
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

[PHP] Passing Array to object

2003-06-25 Thread Daniel J. Rychlik
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