Vixushr Posted November 16, 2010 Share Posted November 16, 2010 Helo, I need help with mine script. It downloads xml from distant server and all works ok but i need help to change something on that downloaded xml. It contains element (column) that has products names and its called "products". in there i have products code names and i have specific situation where i get products codes in form like this "AA123BB#CCC". I need to somehow strip or delete or atleest ignore in further querry symbol "#" and everything after it. In this case i need to remove "#CCC" so that my column has only first part of data "AA123BB". Help needed!!! Thanx! Quote Link to comment Share on other sites More sharing options...
simshaun Posted November 16, 2010 Share Posted November 16, 2010 $name = $valueFromXml; if (strpos($name, '#') !== FALSE) { $name = substr($name, 0, strpos($name, '#') ); } Quote Link to comment Share on other sites More sharing options...
Vixushr Posted November 16, 2010 Author Share Posted November 16, 2010 Thank you mate. PERFECT! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.