php4

PHP array manipulation

I have the code below . it looks for the case and creates an array of rows and columns. $pv->results[$row1][1][0] actually is $pv->result->[rownumber][coulmnnumber][0]. Now this is for only 2 columns as you can see. However I want an array like $myArr = array(0=>1, 1=>7, 2=>8, 3=>9 ) to be added below for column. What it is doing, ...

need some tips on text editor?

hi I am creating a text editor in php can anyone show me a best example for creating a text editor ...

Looking for an easy explanation of exec in PHP

I am having trouble understanding the exec function in PHP. Can someone please explain it to me in simple terms? ...

what does this do

$top += $i ? 12 : 0; ...

CodeIgniter not working on PHP 4 server without .htaccess availability

Hi All, Basically i developed my app on a localhost wamp server with PHP 5. ON uploading to the actual host i notice that The server is running php 4.4.9 Everytime i upload my .htaccess file, the server removes it completely.. seems to not be allowed When i test out the set all i get is a 404 page not found Any help on how to make...

truly unique random number generate by php?

I'm have build an up php script to host large number of images upload by user, what is the best way to generate random numbers to image filenames so that in future there would be no filename conflict? Be it like Imageshack. Thanks. ...

how to restrict a page to only a specified ip range in php

hey guys im looking for a way to restrict my administration page to only my own ip range concider my ip range is 215.67.. so in php i will begin with this : $myip = "215.67.*.*"; $myip = explode(".", $my_ip); $userip = getenv("REMOTE_ADDR") ; $userip = explode(".", $userip); if ($myip[0] == $userip[0] AND $myip[1] == $userip[1]...

an better way to do this code

myarray[] = $my[$addintomtarray] //52 elements for ($k=0; $k <= 12; $k++){ echo $myarray[$k].' '; } echo '<br>'; for ($k=13; $k < 26; $k++){ echo $myarray[$k].' '; } echo '<br>'; for ($k=26; $k < 39; $k++){ echo $myarray[$k].' '; } echo '<br>'; for ($k=39; $k <= 51; $k++){ echo $myarray...

PHP 4 - Get date of Monday in current week

Hi, I need to find the date of Monday in the current week, whats the best way of doing this in php 4? Thanks, Ben ...

how to get rid of empty elements

I have an array thats generated dynamically and it has some empty elements. How do I get rid of empty elements from an array? array 0 => string '' (length=0) 1 => string 'x%6wm' (length=5) 2 => string 'x%6wmvf' (length=7) 3 => string 'x%645' (length=5) 4 => string '' (length=0) And I want it to become like array 0 => str...

What does "->" do or mean in PHP?

I have seen this at a lot of place but have never understood it's meaning or working... for example: // Registry $registry = new Registry(); // Loader $loader = new Loader($registry); $registry->set('load', $loader); If someone can elaborate this, I will be very greatful... thanks in advance... ...

Importing Variables from PHP 4 into Flash

I'm trying to get variable importing from a PHP script before I implement it into a larger project. So far all I've gotten is headaches. // this is all thats in test.php other than the open and close brackets. // Normally I'd have it doing a mysql_query and putting useful information into the print statement. print( "lamegame.net/test/t...

Framework or CMS for php web development?

Hi all, I am a C++,Unix developer who has never dabbled in web development apart from creating simple HTML pages. I am going to change that and develop a website at a personal level soon. I am going to use php,mysql on a linux machine. In this regard I am browsing through relevant literature. The language isn't a problem but reading abo...

How can I generate a list of pay-period-ending dates in PHP4?

I see that all of the good date/time functions are PHP5 only, which sort of makes this hard. I need to generate a list of all pay-period-ending dates starting with 52 weeks back and going to one pay period in the future, with bi-weekly periods. So, suppose the next pay period ending is June 26, 2010 and today is June 23, 2010, I'd want ...

What are the differences between php 4 and php 5?

I have some code that gets a wordpress rss feed and displays the news articles on my own website. This code works fine on my development server that is running php 5.3.1 but when I upload it to my live website that only has php 4.4.9 I am getting lots of problems. The code I have is based on MagpieRSS (http://magpierss.sourceforge.net) ...

PHP NuSOAP Client Issues (Articulate Online)

I'm trying to integrate with the Articulate Online SOAP API (https://www.articulate-online.com/Services/Api/1.0/Documentation/TOC.aspx) on a PHP4 server using the NuSOAP (http://sourceforge.net/projects/nusoap/) client. I've done NuSOAP integrations in the past without much effort, but this one seems to be more troublesome due to the co...

objects..better arrays?

I was just reading through a tutorial and they mentioned that Objects in php are just the better way of arrays. I am confused? Can someone clear the concept for me. thanks ...

how to find Page id inwordpress

i need to get page ID in wordpress throught php? ...

Masking a social security number

I have a Social Security number showing up like this: 1234567890 I want to show it like this: ###-##-7890 So, basically, masking the first five digits and entering hyphens. How can I do that? Thanks. ...

php + mysql : find data by time end & time start

event table have two fields start and end and all in datetime format This is query SELECT e.* FROM jos_events e WHERE 1=1 AND e.start >= 2006-07-10 AND e.end <= 2015-10-21 ORDER BY e.id DESC i want to find events between time start and time end. how to do it ? ...