Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Space Characters Getting Converted to Unknown Character

Super26Super26 Posts: 14Member
I've got a problem with my PHP code using Drupal. What I have is an array of names, which has a particular format and can contain characters as well as spaces. The name can be of two formats:

[code]
$name[0] = "--> Psychic Barrtier";
$name[1] =" Initial Presence";
[/code]

In my code, I take each line in the array, and use a preg_match statement to see if it matches these two patterns. So, I am basically looking for a line that starts with two dashes and '>' this, followed by a space. Or I am looking for a line that starts with 4 spaces. This is my preg_match statement:

[code]
while (preg_match('/^(--> |--> |--> | {4}|    |
Sign In or Register to comment.