F3lla
F3lla

Reputation: 27

strip_tags and trim not working together

I need some help. I want to extract html tags and spaces, but this code not working. Where is my fault

Code in usage;

$ozellikpar = $ozellikler1[0]; 
echo strip_tags (trim($ozellikpar[13]));

Output;

<option value="">      Deneme</option>

But must be;

<option value="">Deneme</option>

Thank you.

Upvotes: 1

Views: 915

Answers (1)

Ruydo
Ruydo

Reputation: 305

You have to use

echo trim(strip_tags ($ozellikpar[13]));

Upvotes: 1

Related Questions