Jump to content

Genre Php Function


Oliver Briggs

Recommended Posts

I assume you want the value between the <servergenre> and </servergenre> tags. Explode breaks a string up into an array using the first argument as the delimiter, and is not the right function for this (though with some creativity and the trim() function, it could probably be made to work)

 

Seeing that the format of the source data is likely XML, look up PHP SimpleXML. It makes it much easier to get any value you could possibly want with very little effort. This is the example page: http://php.net/manual/en/simplexml.examples-basic.php

Link to comment
Share on other sites

Unfortunately I cannot write your code for you (both because I don't know the environment and data being passed to this program, and because we generally do not provide coding assistance except for troubleshooting compatibility with our servers).

 

If you have trouble developing it though, feel free to ask questions. This site on PHP's website should get you started on how to handle your data, assuming your data is XML: http://php.net/manual/en/book.simplexml.php

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...