hey,
I need a quick PHP code that does this:
Finds whether a hyphen is the FIRST character in a string OR LAST character.
E.g. It displays an error for this:
-test
And this:
test-
But not this:
te-st
or....
tes-t
Etc. Just first and last character. 25 NP$ to the person who can write up this PHP code real quick, I can't figure it out for some reason.
Thanks,
-Matt
I need a quick PHP code that does this:
Finds whether a hyphen is the FIRST character in a string OR LAST character.
E.g. It displays an error for this:
-test
And this:
test-
But not this:
te-st
or....
tes-t
Etc. Just first and last character. 25 NP$ to the person who can write up this PHP code real quick, I can't figure it out for some reason.
Thanks,
-Matt















