Seperate team from score
Posted on
16th Feb 2014 07:03 pm by
admin
I am writing a site that does a NFL Pick 'em type application and I have a feed that gives me the scores of the NFL games every week I have it split apart down to each game two teams and a score directly after it...
Here is what it is stripping the info from to begin with
Did you know?Explore Trending and Topic pages for more stories like this.
&nfl_s_left1=Houston%20at%20Buffalo%20(1:00%20PM%20ET)
Here is the code:
Code: [Select]foreach($content_array as $content) {
if (strpos($content, "_left")) {
$count=0;
$equalpos = strpos($content, "=");
$end = strlen($content);
$title = substr($content, ($equalpos+1), $end);
$title = str_replace("^", "", $title);
$title = str_replace("%20%20%20", "
",$title);
$title = str_replace("%20", " ", $title);
$game[$i]=$title;
$scorearray[$i]["title"] = $title;
$i++;
}
}
Here is an example of what it looks like
here is what it looks like after the game
Houston 31 at Buffalo 30 (Final)
And here is what it looks like before the game
Houston at Buffalo (1:00 PM ET)
The information that I need is team_home, team_home_score, team_away, team_away_score, game_status(Whether it is finished or what time the game is).
Any ideas or anything would be great!
No comments posted yet
Your Answer:
Login to answer
342
31
Other forums
Get keys and values from an array
Hellow,
I have an array $Data with keys and values. With a foreach I can display all the valu
Form help: Syntax & Logic
Hello again all,
I'm working on a form and ran into a wall (again) and can't seem to think th
Parse XML
Good day,
I use oempro software and try to parse XMLReturn but it's not working for me, simpl
mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP functi
an interesting question
Greetings folks, got to ask an interesting question...
let say
i have created a function s
Disabling SAP menu
How do I disable SAP menu for all the users and just restrict them to User Menu in SAP ECC 6.0?
Email Processor
I have a few questions so this post will be a larger one! Sorry, but I'm a bit of a PHP newbie so be
Setting condidtions for an input box
Hi all,
I would like to set a condition in a txt box that says the number a user enters has t
Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment
php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho