NameSilo

[PHP] Whats wrong here (easy one)

SpaceshipSpaceship
SpaceshipSpaceship
Spacemail by SpaceshipSpacemail by Spaceship
Watch

w1ww

Established Member
Impact
9
Whats wrong here?:

PHP:
//array of invalid characters
  $junk = array('.' , ',' , '/' , '\' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');

Error:

Parse error: syntax error, unexpected '`', expecting ')'


Thank you :)
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
w1ww said:
Whats wrong here?:

PHP:
//array of invalid characters
  $junk = array('.' , ',' , '/' , '\' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');

Error:




Thank you :)

I don't know php but I think you have to escape special characters, So where you have '\' it should be '\\'. There are other special characters you have to escape but like I said I don't know PHP, So I don't know witch ones
 
0
Close
0
Close
Try this.

Code:
$junk = array('.' , ',' , '/' , '\'' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');
 
0
Close
Code:
$junk = array('.' , ',' , '/' , '\\' , '`' , ';' , '[' ,  ']' , '-', '_', '*', '&', '^', '%', '$', '#', '@', '!', '~', '+', '(', ')', '|', '{', '}', '<', '>', '?', ':', '"', '=');
You need to escape the \
 
0
Close
Thank for the help guys:)
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back