Current location: Hot Scripts Forums » Programming Languages » PHP » gotoAndStop


gotoAndStop

Reply
  #1 (permalink)  
Old 06-28-05, 01:41 PM
woyrz's Avatar
woyrz woyrz is offline
Newbie Coder
 
Join Date: Dec 2003
Location: montreal
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Cool gotoAndStop

i am working on a array in php and i am a bit confuse.

i want to send a playhead on my array at a specific position i i couldn't figure it out how to do it.

does anyone know how to do it with out doing a simple loop.

there's any function to send the play head at a position in a array
Reply With Quote
  #2 (permalink)  
Old 06-28-05, 01:51 PM
Keith's Avatar
Keith Keith is offline
Community Liaison
 
Join Date: Feb 2004
Posts: 1,232
Thanks: 1
Thanked 11 Times in 11 Posts
Are you talking PHP or Flash?
Reply With Quote
  #3 (permalink)  
Old 06-28-05, 02:01 PM
woyrz's Avatar
woyrz woyrz is offline
Newbie Coder
 
Join Date: Dec 2003
Location: montreal
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
im talking about php

thanks
Reply With Quote
  #4 (permalink)  
Old 06-28-05, 02:35 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
what is play head?
you could assing values to any array element if you know its key index like:
PHP Code:

$array = array(=> 'sa''assoc' => 'safer''now' => 'wow');


$array[2] = 'new value';
$array['assoc'] = 'no more safer'
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #5 (permalink)  
Old 06-28-05, 04:21 PM
woyrz's Avatar
woyrz woyrz is offline
Newbie Coder
 
Join Date: Dec 2003
Location: montreal
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Cool

PHP Code:

//array creation 

$data=array( "2004-05-13"=>"20135215""2005-04-13"=>"20135215""2005-05-10"=>"20135215""2005-05-19"=>"20135215""2005-05-20"=>"20135215", );

//loop on the content of the array
while(key($data)>="2005-04-13"){
//display the key
echo key($data)."<br>";
echo 
current($data);
next($data);

when i use current() the value return result in the current position of the play head
http://ca.php.net/manual/fr/function.current.php

i want to be to after the loop is done to send the play head at another given position without having to do a loop

thanks fb
http://www.mediaflexdesign.com
Reply With Quote
  #6 (permalink)  
Old 06-29-05, 04:08 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
you mean you want to find the element where the key is "2005-04-13" ?
PHP Code:

$data=array( "2004-05-13"=>"20135215""2005-04-13"=>"20135215""2005-05-10"=>"20135215""2005-05-19"=>"20135215""2005-05-20"=>"20135215", );


if (isset(
$data["2005-04-13"]))
   echo 
$data["2005-04-13"];
else
   echo 
'not found'
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
  #7 (permalink)  
Old 06-29-05, 03:30 PM
woyrz's Avatar
woyrz woyrz is offline
Newbie Coder
 
Join Date: Dec 2003
Location: montreal
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
i found it Thanks a lot

fb
http://www.mediaflexdesign.com
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 06:53 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.