Hello! Today, I want to use arrays to improve our shopping cart and find out more about them as we go a long! This post is going to be split into two: Part 1 and 2. You want read them in parts or in full. There are basically two types of arrays in PHP: numerically indexed arrays – where indices start at zero by default and non-numerically indexed arrays – where the keys can be set to whatever you deem meaningful. Let us start with numerically indexed arrays:
This is a preview of
Putting Arrays To Work – Shopping Cart (php)
. Read the full post (1765 words, estimated 7:04 mins reading time)
Hi! After adding some functionality to our shopping cart, I am going to do something different today: storage. Assuming we want to collect all the orders from customers and store them in a file somewhere for later use, we can easily create a file and write and read to and from it. I have altered the original look of our simple cart by adding a new input area for shipping address: Let us look at it now.
Hi! I know you are probably asking what the heck is he doing? I will be honest here, this is not a tutorial but a simple quick fix to a problem I faced last night. I was invited by an author to take part in the so called blog hopping. One of the requirements was to find at least five other authors with blogs to join the adventure. So, I asked myself, how could I make this as much fun as possible and learn something at the same time?
This is a preview of
A simple python script to find bloggers on twitter
. Read the full post (820 words, 1 image, estimated 3:17 mins reading time)
So, we are almost at the end of the journey here and I am so excited to do so. In my previous post, I demonstrated how to pick up the pieces from the returned data and put them into a single file. That was easy right?
The problem is that if someone else wanted to use my code, they would have to change parts of the code every time, which is not very smart! Today, I am going to put our code together, encapsulate it in a function that will take one parameter from the user and perform the tricks behind the scenes and boom, you get clean tweets containing the query keyword you entered. I know, I should stop talking and show you what I did:
In this challenge, we are required to perform some data parsing using JSON methods. Since I am going to use Python, I will be importing some libraries into my file and then make some real API calls to Twitter instead of using the provided JSON data.
I am going to do several things and still make this post as short as possible!
#perform some data parsing using json.
#make api calls to twitter servers
#### mozilla challenge – programming with twitter api
import urllib2 #python module for handling urls
import json #json anyone??
url = ‘http://api.twitter.com/1/statuses/user_timeline/eenvincible.json’