I make my daily NBA schedules using the nba.com site here, but they changed the layout of it now it contains more data. Using PHP, I was able to turn
this:
5:00 PM ET
LA Clippers
Charlotte Hornets
Spectrum Center
Charlotte, NC
GAME PREVIEWBUY TICKETS
into this:
5:00 PM ET
LA Clippers
Charlotte Hornets
However, I am having difficulties turning that into this:
5:00 PM ET LA Clippers @ Charlotte Hornets
I am open to suggestion even other languages like javascript/jquery that I could implement into a userscript if not PHP.
any suggestions?
code I'm currently using to clean the words i don't want.
<?php
$name = $_POST["teamname"];
$words = array("Spectrum Center","Charlotte, NC","Bankers Life Fieldhouse","Indianapolis, IN","Wells Fargo Center","Philadelphia, PA","Quicken Loans Arena","Cleveland, OH","bc","Chesapeake Energy Arena","Oklahoma City, OK","Toyota Center","Houston, TX","American Airlines Center","Dallas, TX","GAME PREVIEWBUY TICKETS","Vivint Smart Home Arena","
Salt Lake City, UT");
$name = str_replace($words,"",$name);
if(isset($_POST["teamname"])){
echo 'output:<br /><br /><textarea name="teamname" cols="80" rows="20" onclick="this.focus();this.select()">'.$name.'</textarea>';
}
?>
edit: added my code.