I got an xml file :
<?xml version="1.0" encoding="utf-8"?>
<pluginlist>
<plugin>
<pid>1</pid>
<pluginname>ChatLogger</pluginname>
<includepath>pugings/</includepath>
<cmds>say
</cmds>
<cmds>sayteam</cmds>
<cmds>tell</cmds>
</plugin>
</pluginlist>
And a php was something like this :
<?php
$xml_pluginfile="pluginlist.xml";
if(!$xml=simplexml_load_file($xml_pluginfile)){
trigger_error('Error reading XML file',E_USER_ERROR);
}
foreach($xml as $plugin){
echo $plugin->pid." : ";
foreach($plugin->cmds as $value)
{
echo $value." ". strlen(value)."<br />";
}
echo "<br />";
}
?>
The output i get is :
1 : say 5
sayteam 5
tell 5
Why do i get the length of each output as 5 ?
and when i try to do this :
if($value)=="say"
Why is this happening ?
Please help me thanks