Jump to content

Display row where strpos 0,1 are matched


wright67uk

Recommended Posts

I'm looking to only return rows where the first two letters of $_attributeSelection["backp1"] are GB

I'm sure I need to use strpos somehow, but Im not sure how to use it with my code can anyone show me how?





 

<?php
foreach ($selections as $_selection) {
$_attributeSelection = $_selection->attributes();
?>
<tr>
<td>
<?php echo $_attributeSelection["name"] ?> 
</td> 

<td>
<b><?php echo $_attributeSelection["backp1"] ?></b><br/> 
</td>

</tr>
 

 

Link to comment
https://forums.phpfreaks.com/topic/275111-display-row-where-strpos-01-are-matched/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.