Page 1 of 1

sending a PHP Array to flash?

Posted: Tue May 31, 2005 8:34 pm
by gulline
--
You guys have been kind enough to help me come up with this code (in the sense that you guys created it and I modified it a bit).

Code: Select all

<?php 
foreach (glob("*.swf") as $filename) {   
$newvar = explode('.',$filename);   
"&bob=$newvar[0]&"  ;
};
?>
When I set bob (a text field in my flash movie) equal to $newvar[0] it returns $newvar[0]

how do I return the contents of $newvar[0] in stead of the name $newvar[0]

JCART | Please use

Code: Select all

tags when posting php code.   [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Review Posting Code in the Forums[/url][/color]

Posted: Wed Jun 01, 2005 4:05 am
by timvw
Not sure what you are trying to say... Reading the manual (http://www.php.net, chapter on string manipulation will tell you everything you need to know (and more..)

Code: Select all

<?php 
foreach (glob("*.swf") as $filename) {   
  $newvar = explode('.',$filename);
  echo "&bob={$newvar[0]}&";
};
?>