# Showing multiple variable from PHP in Flash (content= persistant after first entry)

**URL:** <https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555>\
**Category:** flash\
**Created:** [August 28, 2003, 4:11am UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555 "2003-08-28T04:11:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wintermute](https://avatars.discourse-cdn.com/v4/letter/w/e19b73/32.png) [@Wintermute](https://forum.kirupa.com/u/Wintermute)\
**Post date:** [August 28, 2003, 4:11am UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555/1 "2003-08-28T04:11:47Z")

</div>

I wasn’t sure if I should start up a thread for something that already semi-exist…but my problem started after the solution I’ve found for another problem in [this thread here](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=26338). I altered the codes a bit so I can debug it better and that it comes out the way I want it to.

What’s happening is that everything works great, but each new entry has the word “content=” next to it.

Does anyone know how to get rid of that?

This the the code I used in the PHP file:

```php

<?
...
//The connection stuff is there already
  $query = "SELECT * FROM news ORDER BY id DESC";
  $result = mysql_query($query);

while ($r = mysql_fetch_row($result))
{
$contents = "<b>". $r[1] . "
" . $r[3] . "</b>
" 
. $r[2] . "
"; // add to the string

print "content=".$contents;  
}
?>

```

And the following is what I put into one of the keyframes:  
[AS]  
news.html = true;  
loadText = new loadVars();  
loadText.load(“news.php”);  
//creating the loadVarsText function  
loadText.onLoad = function() {  
news.htmlText = this.content;  
};  
[/AS]  
The textbox is named news and the variable is content (just in case someone who wants to do something similar to this/has about the same trouble stumbles by 😉 ).

I can’t see any way to get this problem out, and just for visual sake, this is what comes out:  
 ![](http://www.infinitedelusions.com/content=trouble.JPG)

Thanks for any help you guys can provide 🙂  
~Kamiko

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2003, 4:38am UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555/2 "2003-08-28T04:38:44Z")

</div>

try

```php

print "content=$contents[content]";

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2003, 4:43am UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555/3 "2003-08-28T04:43:57Z")

</div>

It didn’t work, but I hope you don’t mind explaining why you suggested that because I can’t really see where [content] is coming from.

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2003, 1:22pm UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555/4 "2003-08-28T13:22:14Z")

</div>

hmm well i’m pretty new to php, but thats the code I used on my page. however when i load the vars, i use the

```auto
loadVariablesNum

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2003, 4:37pm UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555/5 "2003-08-28T16:37:46Z")

</div>

My problem stemmed from using loadVariables and it didn’t go away with that loadVariablesNum either ☹

Thanks for you efforts though, Digitalosophy 🙂

Btw, in php, when you use the [], most of the time it’s for calling a row number (if you use mysql\_fetch\_row) or the name of the row (if you use mysql\_fetch\_array). I think the interpreter skipped over the [content] part since it wouldn’t have mattered whether it’s there or not.

I hope that helped clear up some stuff and explains why I’ve asked why [content] is there. 🙂

**EDIT:**  
Turns out all I had to do is make PHP print the content= before the while loop starts! LOL, I got it fixed now. Still, I thank you, Digitalospohy, for responding so quickly and for offering your help. Thanks :beam:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 28, 2003, 8:02pm UTC](https://forum.kirupa.com/t/showing-multiple-variable-from-php-in-flash-content-persistant-after-first-entry/29555/6 "2003-08-28T20:02:12Z")

</div>

o cool i see. glad you got it working!

and your welcome 🙂
