php-general Digest 21 Dec 2006 09:11:02 - Issue 4526
Topics (messages 246096 through 246115):
Re: [an attempt to inject a bit of humor back into the situation] Re: [PHP]
Recomended host
246096 by: Børge Holen
246098 by: Jochem Maas
Do Sockets Cache?
246097 by: Aras
php-general Digest 21 Dec 2006 21:32:18 - Issue 4527
Topics (messages 246116 through 246137):
Re: Poping array which has the matching value
246116 by: Sumeet
246117 by: Jochem Maas
Creating multidimensional array
246118 by: Yonatan Ben-Nes
246119 by: Jochem
# [EMAIL PROTECTED] / 2006-12-21 03:33:36 +0100:
On Wednesday 20 December 2006 13:37, Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2006-12-19 19:05:23 +0100:
What major compelling reasons do I have to start using exceptions and
OOP-5?
What about performance?
Did you measure the
Che Hodgins wrote:
Leo,
$letters = array('a', 'b', 'c', 'd', 'e', 'f');
$key = array_search('c', $letters);
you can also try
unset( $letters[$key] );
sumeet
$value = array_splice($letters, $key, 1);
$value[0] will contain 'c'
$letters will contain Array ( [0] = a [1] = b [2] = d [3] = e
Leo Liu wrote:
Hi,
I wanted to search through the array and pop out the value which match my
search criteria. For example
If array has {a,b,c,d,e,f}
I wanna search for c and once I found it, took it out from the array.
here is a 'solution', you may not understand it fully - in which
Hi all,
I got a problem with creating a multidimensional array which it's size is
unknown.
I already made it work like this (example):
?php
$array = array('six','five','four','three','two','one');
for ($i = count($array)-1; $i = 0; $i--) {
$array_keys_string_representation .=
you can do this with a bit of reference magic...
?php
$ref = null;
$keys = array(six,five,four,three,two,one);
$val = string value; // the node value
$arr = array(); // generated array
$ref = $arr;
while ($key = array_pop($keys)) {
$ref[$key] = array();
$ref = $ref[$key];
}
On Thu, 2006-12-21 at 14:54 +0200, Yonatan Ben-Nes wrote:
Hi all,
I got a problem with creating a multidimensional array which it's size is
unknown.
I already made it work like this (example):
?php
$array = array('six','five','four','three','two','one');
for ($i = count($array)-1; $i =
Hi ...
I have the following;
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
$filedate=date (M d, Y H:i:s,
filemtime($file));
Steven Macintyre wrote:
I have the following;
$files = array();
$curimage=0;
if($handle = opendir($dirname)) {
while(false !== ($file = readdir($handle))){
if(eregi($pattern, $file)){
$filedate=date (M d, Y H:i:s,
filemtime($file));
$files is empty - nowhere in your while loop do you add any data to it.
My guess is your question is really 'Why are my images displayed in the same
order as the directory?'. This is because you're displaying them at the same
time as reading the dir. To randomise the order, add all the file names
Ok ... previous problem sorted ... now onto the next ...
The client wants the following;
A scroll bar with 3 random thumbs from each subdirectory in the /images/
folder
I was thinking ...
Going into each folder, getting files, pushing into an array - shuffling
array, taking first three items
Okay, this doesn't have to do with PHP directly, but it does have to do
with this list. I'm using MS Outlook 2003. My company has an exchange
server, and the Evolution OWA client doesn't work well enough for all
the calendaring stuff I have to do. So, I was wondering if anyone else
out there
Ha! Mine too! How long before this secret gets out and our apps all start
imploding??
Technically this is true. You can't do AJAX with PHP4. Or PHP5. Not the
AJAX part at least, since it's all handled in Javascript.What gets
returned to the AJAX app and what it interacts with on the
Hello
I have a soap call that returns something like;
Result from a print_r();
stdClass Object ( [getCategoryTreeReturn] = Array ( [0] = stdClass Object
( [iId] = 1 [sName] = Cars Motorbikes [iParentId] = 0 [iTreeCount] =
114302 [iLocalCount] = 0 [aSubCats] = Array ( [0] = stdClass Object (
Ray Hauge wrote:
Okay, this doesn't have to do with PHP directly, but it does have to do
with this list. I'm using MS Outlook 2003. My company has an exchange
server, and the Evolution OWA client doesn't work well enough for all
the calendaring stuff I have to do. So, I was wondering if
Hi again,
Just wandering if someone could help me on this one- I'm quite anxious
to get something together. As I said in the last email I just want to
use ob_start(ob_gzhandler) but it doesn't seem to work with the error
function. I think it might be something to do with not being allowed
# [EMAIL PROTECTED] / 2006-12-20 14:12:11 +:
I include a php file at the beginning of every web page in this site.
This include file has an error handling function and starts output
buffering...
// Start of Error Handler
error_reporting(E_ALL ^ E_NOTICE);
ini_set('log_errors','1');
Hey guys,
I just switched email accounts, so I'm testing to make sure that the
subscription worked.
Thanks,
Ray
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello everyone,
I just switched to one of my personal accounts. Just making sure that
the subscription went well.
Thanks,
Ray
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi
You can make AJAX Applications without XML (AJWOX). You can also make
Synchronous AJAX without using the XMLHttpRequest Object.
You can call it SJWOX (synchronous javascript without XML).
The thing I like is, that character encoding is correct if you use XML
for sending data to the server.
On Thu, 2006-12-21 at 20:02 +0100, Bernhard Zwischenbrugger wrote:
Hi
You can make AJAX Applications without XML (AJWOX). You can also make
Synchronous AJAX without using the XMLHttpRequest Object.
You can call it SJWOX (synchronous javascript without XML).
The thing I like is, that
I have found the solution to the Statdaus Download Center Lite or the
config.dat.php file people have been talking about.
If you want to know what the config file is doing create a php file and put
it in the main directory:
?php
$script_root =
# [EMAIL PROTECTED] / 2006-12-21 18:06:28 +0200:
Hello
I have a soap call that returns something like;
Result from a print_r();
stdClass Object ( [getCategoryTreeReturn] = Array ( [0] = stdClass Object
( [iId] = 1 [sName] = Cars Motorbikes [iParentId] = 0 [iTreeCount] =
114302
I'm wondering why this is.
$data = ;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$data = Test;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$data = Test,Test;
$array = explode(,,$data);
$count = count($array);
$count will = 2
Why doesn't the first
On Thu, 2006-12-21 at 13:31 -0800, Kevin Murphy wrote:
I'm wondering why this is.
$data = ;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$data = Test;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$data = Test,Test;
$array =
Kevin Murphy wrote:
I'm wondering why this is.
$data = ;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$data = Test;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$data = Test,Test;
$array = explode(,,$data);
$count = count($array);
$count will = 2
On Thu, 21 Dec 2006, Kevin Murphy wrote:
I'm wondering why this is.
$data = ;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$array has 1 element: An empty string.
$data = Test;
$array = explode(,,$data);
$count = count($array);
$count will = 1
$array has 1 element:
Not sure why it does it, but doesn't seem to be a huge deal. I'm guessing it's
because an empty string is still a string. It's not null.
Anyway, it's documented at:
http://us3.php.net/manual/en/function.explode.php
A user writes:
If you split an empty string, you get back a one-element array
I need to output that as
Category: X
Sub-category: 1
Sub-category: 2
..
..
linking by id's to parent id's just like in a database.
-Original Message-
From: Roman Neuhauser [mailto:[EMAIL PROTECTED]
Sent: Friday, December 22, 2006 12:18 AM
To: Marcus
Cc:
On 12/22/06, Steven Macintyre [EMAIL PROTECTED] wrote:
Ok ... previous problem sorted ... now onto the next ...
The client wants the following;
A scroll bar with 3 random thumbs from each subdirectory in the /images/
folder
I was thinking ...
Going into each folder, getting files, pushing
Marcus,
some facts:
1. you CAN return 'proper' values from a recursive function call.
2. you DONT need a recursive function call to retrieve the properties
of these objects.
3. you DONT need a recursive function to build a nested data structure
(using the parent-child ID relationship)
with
32 matches
Mail list logo