My first time here! I'm hoping someone can help me out - I'm losing my hair rapidily.
I'm trying to modify a php page which has the following section of code:
Code: Select all
if ( $Globalsї'extra3name'] != "" ) {
echo<<<PPPRINT
<tr><td class="tddetails">{$Globalsї'extra3name']}: <input type="text" value="$extra3" size="10" name="extra3" /></td>
<td class="tddetails">
<table width="0%" border="0" cellpadding="o" cellspacing="0">
<tr align="left" valign="middle">
<td colspan="9" nowrap class="MenuTableHeader" scope="col">Select Colours </td>
</tr>
<tr align="left" valign="middle">
<td width="0" nowrap scope="col"><font class="small">Black</font></td>
<td width="0" nowrap scope="col"><font class="small">White</font></td>
<td width="0" nowrap scope="col"><font class="small">Brown</font></td>
<td width="0" nowrap scope="col"><font class="small">Grey</font></td>
<td width="0" nowrap scope="col"><font class="small">Red</font></td>
<td width="0" nowrap scope="col"><font class="small">Orange</font></td>
<td width="0" nowrap scope="col"><font class="small">Green</font></td>
<td width="0" nowrap scope="col"><font class="small">Blue</font></td>
<td nowrap scope="col"><font class="small">Yellow</font></td>
</tr>
<tr align="center">
<td>
<?php
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
?>
<input type="checkbox" name="Paramї2]" value="A"
<?php
// Note our use of ===. Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos === false) {
?>The string '<?php echo $findme ?>' was not found in the string '<?php echo $mystring ?>'";
<?php } else { ?>
checked
and exists at position <?php echo $pos ?>"
<?php }
// We can search for the character, ignoring anything before the offset
$newstring = 'abcdef abcdef';
$pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
?>
</td>
<td><input type="checkbox" name="Paramї3]" value="B"</td>
<td><input type="checkbox" name="Paramї4]" value="C"</td>
<td><input type="checkbox" name="Paramї5]" value="D"></td>
<td><input type="checkbox" name="Paramї6]" value="E"></td>
<td><input type="checkbox" name="Paramї7]" value="F"></td>
<td><input type="checkbox" name="Paramї8]" value="G"></td>
<td><input type="checkbox" name="Paramї9]" value="H"></td>
<td><input type="checkbox" name="Paramї10]" id="colour" value="I"></td>
</tr></table>
<br>
<br>
<table width="0%" border="0" cellpadding="o" cellspacing="0">
<tr align="center">
<td colspan="4" nowrap class="MenuTableHeader" scope="col">Select Characteristics </td>
</tr>
<tr align="center">
<td nowrap scope="col"><font class="small">Crest</font></td>
<td nowrap scope="col"><font class="small">Eyecomb</font></td>
<td nowrap scope="col"><font class="small">Moustache</font></td>
<td nowrap scope="col"><font class="small">Wingbar</font></td>
</tr>
<tr align="center" valign="bottom">
<td nowrap><input type="checkbox" name="Paramї11]" value="A"></td>
<td nowrap><input type="checkbox" name="Paramї12]" value="A"></td>
<td nowrap><input type="checkbox" name="Paramї13]" value="A"></td>
<td nowrap><input type="checkbox" name="Paramї14]" value="A"></td>
</tr>
</table>
<br>
<table width="200" border="0">
<tr>
<td colspan="7" class="MenuTableHeader">Select The Location </td>
</tr>
<tr>
<td>Tree</td>
<td>In Flight </td>
<td>Reed</td>
<td>Field</td>
<td>Fresh Water </td>
<td>Salt Water</td>
<td>Arid/ Barren </td>
</tr>
<tr>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
<td><div align="center">
<input name="radiobutton" type="radio" value="radiobutton">
</div></td>
</tr>
</table></td></tr>
PPPRINT;
}Code: Select all
<?php
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
?>
<input type="checkbox" name="Paramї2]" value="A"
<?php
// Note our use of ===. Simply == would not work as expected
// because the position of 'a' was the 0th (first) character.
if ($pos === false) {
?>The string '<?php echo $findme ?>' was not found in the string '<?php echo $mystring ?>'";
<?php } else { ?>
checked
and exists at position <?php echo $pos ?>"
<?php }
// We can search for the character, ignoring anything before the offset
$newstring = 'abcdef abcdef';
$pos = strpos($newstring, 'a', 1); // $pos = 7, not 0
?>Any help/ advice is appreciated.
KingFisher