detecting \ in a string
Moderator: General Moderators
detecting \ in a string
Any one have any ideas?
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
You beat me to it, but more specifically, try this snippet:
Code: Select all
<?php
if (strpos($yourstring, '\\') === FALSE) {
echo 'Your string does not contain \\';
} else {
echo 'Your string does contain \\';
}
?>