Okey~ I'm going to assume you're a beginner in C/C++, although you have been programming PHP for a much longer time than me. Let me give you an easier example. Compare them. This is when you don't use pointers :
cpp
#include<iostream>
using namespace std;
void swap(int ,int );
int main(void){
int x,y;
x=10;
y=15;
//print the value of x and y
cout<<"x is now "<<x<<endl;
cout<<"y is now "<<y<<endl;
swap(x,y); //swap!!
cout<<endl;
//let's double check, shall we?
cout<<"x is now "<<x<<endl; //......
cout<<"y is now "<<y<<endl; //......it didn't swap??
return 0;
}
void swap(int x,int y){
int temp;
//let's swap the value between x and y
temp=x;
x=y;
y=temp;
cout<<endl<<"now in function swap and after we swap the value between x and y"<<endl;
cout<<"x is now "<<x<<endl;
cout<<"y is now "<<y<<endl;
//okey.... so we swapped the value between x and y, didn't we?
}
as opposed when you use pointers :
cpp
#include<iostream>
using namespace std;
void swap(int *,int *);
int main(void){
int x,y;
x=10;
y=15;
//print the value of x and y
cout<<"x is now "<<x<<endl;
cout<<"y is now "<<y<<endl;
//swap!!
swap(&x,&y);
cout<<endl;
cout<<"x is now "<<x<<endl; //it swapped!!!
cout<<"y is now "<<y<<endl; //see? it worked!!
return 0;
}
void swap(int *px,int *py){
int temp;
//let's swap the value between x and y
temp=*px;
*px=*py;
*py=temp;
}
hope this helps you