getting html tags while retrieving webpage text

Hello there,

Here is my problem: I try to make a highscore which is connected to a database, for this I print the whole highscore on a webpage. I get it out of this webpage by the following code:

public string retrieveChatURL;

	// Use this for initialization
	IEnumerator Start () {
		WWW wwwRetrieve = new WWW (retrieveScoreURL);
		yield return wwwRetrieve;
		transform.guiText.text = wwwRetrieve.text;
	}

It works fine but I get more text than I would like to, I also get the /br’s in the text which gives a messy result like this(/br’s in php):

    Filips: 19/brFilipsII: 23/brBart: 16/brBoaz: 28/br

I have already tried to fix this by putting the /br’s in html as well. This gives a more structurated result but still looks bad ofcource:

    Filips: 19		html 		/br 		/html
  FilipsII: 23		html 		/br 		/html
  Bart: 16		html 		/br 		/html 		
    Boaz: 28		html 		/br 		/html               

Any help appreciated!

PS: I removed the “<” and “>” of each /br because the text inside it didnt show up :stuck_out_tongue_winking_eye:

Try this (js):

var TestString = "Filips: 19        html         /br         /html";

function Start ()
	{
	TestString = TestString.Replace("        html         /br         /html", "");
	Debug.Log(TestString);
	}

EDIT: Tested and working.

EDIT 2: Alternatively, like I said in the comments, remove the /br s that you added yourself, and then you can do this (js):

var TestString = "Filips: 19/brFilipsII: 23/brBart: 16/brBoaz: 28/br";
var Scores : String[];

function Start ()
	{
	TestString = TestString.Replace("/br", "/");
	Scores = TestString.Split("/" [0]);
	for (i in Scores)
		{
		Debug.Log(i);
		}
	}

Now, the array Scores will hold all the high scores and you can more easily access them in any order you want.