Re: [PHP] PHP arrays and javascript

2004-11-30 Thread Nick Peters
Hodicska Gergely wrote: trigger_error('Hoppa, egy új típus a PHP-ben? '.__CLASS__.'::'.__FUNCTION__.'()!', E_USER_WARNING); on that line, what is the error you are trying to catch? I can't read what ever language that is ;-) thanks. -Nick Peters -- PHP General

Re: [PHP] PHP arrays and javascript

2004-11-30 Thread Nick Peters
Hodicska Gergely wrote: Hi! Would this work the same for multidimensional arrays? Encoding was a special feature needed by me, maybe you don't need it. Usage: myArray = array(...); echo 'script'.arrayToJsArray($myArray, 'myArray').'/script'; Felho --- 8 --- arrayToJsArray.php ---

Re: [PHP] PHP arrays and javascript

2004-11-29 Thread Nick Peters
Marek Kilimajer wrote: Nick Peters wrote: Hey, i know this probally a simple question, but it has been stumping me for quite some time now. How do i pass a php array to a javascript? i tryed: script language=javascript var myarray = new Array(?PHP echo $myarray; ?); /script but it

Re: [PHP] PHP arrays and javascript

2004-11-29 Thread Marek Kilimajer
Nick Peters wrote: Marek Kilimajer wrote: Nick Peters wrote: Hey, i know this probally a simple question, but it has been stumping me for quite some time now. How do i pass a php array to a javascript? i tryed: script language=javascript var myarray = new Array(?PHP echo $myarray; ?); /script but

Re: [PHP] PHP arrays and javascript

2004-11-29 Thread Hodicska Gergely
Hi! Would this work the same for multidimensional arrays? Encoding was a special feature needed by me, maybe you don't need it. Usage: myArray = array(...); echo 'script'.arrayToJsArray($myArray, 'myArray').'/script'; Felho --- 8 --- arrayToJsArray.php --- 8 --- ? function

RE: [PHP] PHP arrays and javascript

2004-11-26 Thread Pablo Gosse
snip i know this probally a simple question, but it has been stumping me for quite some time now. How do i pass a php array to a javascript? i tryed: script language=javascript var myarray = new Array(?PHP echo $myarray; ?); /script but it didn't work. Anybody got any ideas? /snip You need to

Re: [PHP] PHP arrays and javascript

2004-11-26 Thread Marek Kilimajer
Nick Peters wrote: Hey, i know this probally a simple question, but it has been stumping me for quite some time now. How do i pass a php array to a javascript? i tryed: script language=javascript var myarray = new Array(?PHP echo $myarray; ?); /script but it didn't work. Anybody got any ideas?