Omit (remove) printed tables if certain text found

Discussion in 'PHP' started by Gamer Unlimited, Apr 29, 2008.

  1. #1
    Hi guys,

    I have a script that gathers results from an API and prints them in tables, sometimes though, it yields crazy results and I'd like to be able to have an area of my script where it specifies IF it finds something from my list of phrases/words THEN delete the table / omit it from results. The only tricky part of this script, I think, is that it has to do this after it gathers API results, but before it prints them to the user. Here is an excerpt from my code, where it is told to print the results from my API XML:


    }else{

    li.innerHTML = '<div align="center"><table height="20" width=300><tr><td width=17><div align=right><img src=play16.png border=0></div></td><td><div align="left"><a onclick="ShowContent(\'box23\'); return true;" href="'+url+'" target="I1" ><b>'+entry.title.$t+'</div></b></a></td></tr></table></div>';


    So you can see that it would need to check '+entry.title.$t+' to see if there are any of the phrases/words that I don't want it to print, before it shows the user the results.

    The things that people will draw from the API are limited so it won't take me long to go through and make a list of phrases that come up in +entry.title.$t+' that I know people will not want to see.

    Let me know if you need any clarification, I know this may be hard to understand what I'm getting at. :)

    Thanks!!
     
    Gamer Unlimited, Apr 29, 2008 IP
  2. kmap

    kmap Well-Known Member

    Messages:
    2,215
    Likes Received:
    29
    Best Answers:
    2
    Trophy Points:
    135
    #2
    I am not clear about what you want you are asking us?

    Regards

    Alex
     
    kmap, Apr 30, 2008 IP