Comment by geek_at 8 years ago thanks I fixed it 2 comments geek_at Reply philjohn 8 years ago Another small point, you don't need that starts with function, just use strpos === 0. jacquesm 8 years ago It's actually good practice to wrap a bit of code like that in a function with a name, as long as it isn't in some kind of extremely frequently executed inner loop.'starts_with' is descriptive and language agnostic where '=== 0' is neither.
philjohn 8 years ago Another small point, you don't need that starts with function, just use strpos === 0. jacquesm 8 years ago It's actually good practice to wrap a bit of code like that in a function with a name, as long as it isn't in some kind of extremely frequently executed inner loop.'starts_with' is descriptive and language agnostic where '=== 0' is neither.
jacquesm 8 years ago It's actually good practice to wrap a bit of code like that in a function with a name, as long as it isn't in some kind of extremely frequently executed inner loop.'starts_with' is descriptive and language agnostic where '=== 0' is neither.
Another small point, you don't need that starts with function, just use strpos === 0.
It's actually good practice to wrap a bit of code like that in a function with a name, as long as it isn't in some kind of extremely frequently executed inner loop.
'starts_with' is descriptive and language agnostic where '=== 0' is neither.