What exactly do you mean? You show $var=" some writing"; with the value being a space then the actual value then you show that you only want the "some writing" and since I am assuming (probably wrong) that you would like just some writing with no space in front then you would use something like $newvar= ltrim($var);
Of course with no code to see what you have attempted it would be almost impossible to really answer your question.