sending a PHP Array to flash?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gulline
Forum Newbie
Posts: 8
Joined: Thu May 26, 2005 2:27 pm
Location: Dana Point

sending a PHP Array to flash?

Post 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]
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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]}&";
};
?>
Post Reply