Cytoscape On Yii

I’m developing a web application that perform some research and display result through cytoscape javascript. I’ve already successfully run an html-only example code, now i want to generate the xml part of the code with php. I don’t know why but nothing is working.

this is the part of code that don’t work

<script type="text/javascript">

            window.onload = function() {

                // id of Cytoscape Web container div

                var div_id = "cytoscapeweb";

                var xml = '\


                  <key id="label" for="all""label" attr.type="string"/>\

                  <key id="weight" for="node""weight" attr.type="double"/>\

                  <graph edgedefault="directed">\

                    <node id="1">\

                        <?php echo "<data key=\"label\">$prot</data>\\\n";?>

                        <data key="weight">2.0</data>\


		<?php $count=2;?>

		<?php  while($row = mysql_fetch_array($result)){

			echo "<node id=\"$count\">\\";                    

			echo "<data key=\"label\">$row['interactor']</data>\\";

                        echo "<data key=\"weight\">1.0</data>\\";

                    echo "</node>\\";

                    echo "<edge source="1" target=\"$count\">\\";

                        echo "<data key=\"label\">$prot to $row['interactor']</data>\\";

                    echo "</edge>\\";






You’ll need to be more specific about what isn’t working and what errors you’re receiving. Also, an integer is not a valid tag ID (see the Attribute Values section).

Are you sure you’re in the right forum? :huh: