ReplaceList problem using <crlf> as separator
Posted: 01 May 2015 20:13
Hi, I've been working on a script which using SC replacelist which I've used numerous times but typically with a "|" separator. With this script however I'm using "<crlf>" and replaceList is not working. There are a number of others ways I've already scripted to get the result not using SC ReplaceList, but it was still driving me nuts. So I tried a simpler replacelist example using bogus info - one using "|" as a separator and the other with identical strings using "<crlf>". The <crlf> version does not work - at least not for me. The variable returned is simply the inputted string. Try this simple replacelist script. Is this a bug or is there something different I should be doing when using "<crlf>" vs. "|"? Thanks.
Code: Select all
step;
$LM_names = "pie|pizza|fork|spoon";
$LM_cids = "14|28|56|112";
$sel_name = "pizza";
$sel_cid = replacelist($sel_name, $LM_names, $LM_cids, "|"); echo $sel_cid; // 28 as it should
$LM_names = "pie<crlf>pizza<crlf>fork<crlf>spoon";
$LM_cids = "14<crlf>28<crlf>56<crlf>112";
$sel_name = "pizza";
$sel_cid = replacelist($sel_name, $LM_names, $LM_cids, "<crlf>"); echo $sel_cid; // pizza as it shouldn't
unstep;