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! Link to comment https://forums.phpfreaks.com/topic/218864-help-with-my-php-script/ 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, '#') ); } Link to comment https://forums.phpfreaks.com/topic/218864-help-with-my-php-script/#findComment-1135061 Share on other sites More sharing options...
Vixushr Posted November 16, 2010 Author Share Posted November 16, 2010 Thank you mate. PERFECT! Link to comment https://forums.phpfreaks.com/topic/218864-help-with-my-php-script/#findComment-1135165 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.