Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.