Welcome Guest, Not a member yet? Register   Sign In
How would you use strip_tags with Validation?
#1

[eluser]inktri[/eluser]
I want to be able to use strip_tags with $rules/Validation class with some allowable tags. How would the syntax look for $rules?

string strip_tags ( string $str [, string $allowable_tags ] )
$rules['body'] = "strip_tags"; => ?

Thanks
#2

[eluser]crumpet[/eluser]
Code:
$rules['body'] = 'strip_tags[$allowable_tags]'
CI assumes that the first argument is the value you are passing and then what oyu put in square brackets is the second argument (don't know if you can have more than 2)




Theme © iAndrew 2016 - Forum software by © MyBB