This is my code
$data['rate_change_with'] = iconv('UTF-8', 'ISO-8859-15//TRANSLIT', $data['rate_change_with']);
$rate_change_with_index_array = preg_split('/\s+/', $data['rate_change_with']);
on a windows machine it works perfectly. But on ubuntu 12.04 it breaks. preg_split has no effect. $data[‘rate_change_with’] is something like
3.3 (spaces/tabs) 4.5 (spaces/tabs) 6.5
Help please!
Thanks
Edit: the spaces and tabs are a ‘different’ type of space/newline characters mixture, and I am not sure what.
Edit2: Not sure if it will help , but here is a screenshot of the target in debugger: https://i.stack.imgur.com/cvSny.jpg
Edit3: actual sample: http://dl.dropbox.com/u/7998366/de.html . The rightmost column is the issue
Edit4: changing to spaces doesn’t help! what am i doing wrong ??
Solution:
Basically I couldn’t figure out the char that was present that was causing the problem, so the above simply removes all characters except for the whitelisted ones, thereby eliminating any strange characters that existed there.