php strpos function returning false positives

php strpos function returning false positives

Post Image

I came across an issue with the php STRPOS() function today that I just had to share.  Well – ok, the function acted as designed, although it’s default behavior is not what I would have intuitively guessed.  Oh the excitements of a programmer The issue was that I had a code routine using STRPOS() that was […]

Using preg_replace in php to replace a character that characters before and after it

Post Image

The title of this post may not seem like that common of a use case – but I ran across a fascinating problem today.  Admittedly my Regex-Foo is not the greatest so I struggled with this one for a bit. I am posting my solution here in hopes that it helps other people. In short […]

array_rand equivalent where the value is same for a period of time

Post Image

I came across a great problem the other day and wanted to share results here.  The problem scenario was that I had a group of objects, and I wanted to show a random entry from the group.  The caveat however, was that I wanted to the random entry to be the same for the period […]

PHP Short Code – How to Change to PHP Long Code Syntax

Post Image

The other day I ran into an interesting problem.  I had to convert an entire code base from using PHP Short Tag syntax, to using their Full Tag syntax.  This post is created to share how I did it in case others need to do the same. What are PHP Short Tags a.k.a short_open_tag? PHP […]

Priests / Laurels Christmas Caroling

Last week we went Christmas Caroling with the Young Men and Young Women.  We went to the Paradise Valley Community Center, a few Outpatient Care Centers in Fairfield as well as a few nearby ward members.       

Merry Christmas Everyone – Everywhere

Multimedia you can actually use…  Found this old gem.   The best part… “You do not have enough conventional memory”… Merry Christmas and Happy Shopping Season!

Locale Codes as Text, PHP Array and JSON Array

Post Image

Often during my random programming projects I find that I need a list of locales in one format or another… to that extent I decided to create this post which has the list of locales formatted in various ways.  First as a plain text list so that you can put it into a text file […]

Cordelia Ward Young Men Slideshow

A video slideshow for the Cordelia 2nd Ward Young Women in Excellence night.  The slideshow shows some of the Young Men activities for the Cordelia 2nd Ward (and some from the original Cordelia ward).

The Core Gaming Loop in Mobile and Social Games

Post Image

What is the Core Gaming Loop within a Mobile or a Social game?  The Core Gaming Loop is what models the full play session from the mechanics point of view.  Meaning, the Core Gaming Loop comprises the core mechanics of the game that a player attempts to accomplish during their play session.  The method in […]

PHP vs RUBY vs PYTHON

Post Image

I came across this today and just had to share it.  Credit for the original post was found on this link: http://blogs.perceptionsystem.com/infographic/code-wars-php-ruby-python/