Forum
Testing for string fails?
Hi,
I have a SELECT in the Admin side of Perch and choose the option house
.
In a page I attempt to detect when it's matched with
$fred = perch_content_custom('slide_show');
echo $fred;
if (strpos($fred,'house') !== false) {
echo 'true';
}
but the test never matches.
Quick check—is there something obvious I'm doing wrong? Thanks in advance for any pointers.
Thanks a ton Drew, works of course.
I had tried this from the docs but it failed:
$fred = perch_content_custom('slide_show', true);
(is your version documented on a different page?)
Cheers, -Alan
The docs are for
perch_content()
Thanks Drew.
[staring blankly at screen in disbelief] —I tried exactly this syntax and it didn't work... I clearly need to drink a different amount of coffee and sorry for troubling you. Cheers, -Alan