Monthly Archive: August 2017

0

Selecting Data From XML Tags in PHP

I need to grab the data from the “enclosure” tag from the following feed: https://queryfeed.net/twitter?q=%40CabosNews&title-type=user-name-both&geocode= In the example, you can modify the “enclosure” field to any of the fields you need help grabbing.  This...

0

MySQL Trim

I have a column within my MySQL table that holds city and states for records. The dataset looks like the following: Clay County, AL Cleburne County, AL Coffee County, AL Colbert County, AL Conecuh...

0

Append Select Option with jQuery

This is a basic example of how to dynamically add new options to your select drop down without reloading the page.  I’m not saving these in the database, but it’s pretty easy to add...

0

PHP DateTime Class and Functions

With PHP 5 they introduced the DateTime class.  Prior to that everyone used strtotime, date, etc…commands to achieve the same results.  I was a late adopter and continued to use the old commands.  Recently...

0

PHP strtok

The PHP function strtok splits a string one by one. In the example below I’m trying to split off everything after the ? in the URL. https://www.facebook.com/LiquidWebInc?fref=ts https://www.facebook.com/CocaColaUnitedStates?brand_redir=1 In PHP I was able to...

0

Username Availability Check

This will be a walk-through on how to create a submit form that checks the database to make sure the username is not taken.  If it is taken it will not allow the submit...

0

PHP parse_str

Quick example of how to use PHP’s parse_str command. Here is an example of my data: $source = “access_token=CAAWhyYsjaWsBAOCwjZCs&expires=5180531”; What I’m trying to do is just grab the string of the access_token variable from...