Jump to content

Returning multiple values from function


graham23s

Recommended Posts

Hi Guys,

 

im not sure if this is possible but from this function:

 

<?php
     function make_flv($uploadedmoviesdir,$outputflvdirectory,$var_loggedinuser) {
     
       $timestamp = time();
     
       ## convert string
       $encode = "/usr/bin/ffmpeg -i $uploadedmoviesdir -sameq -acodec mp3 -ar 22050 -ab 32 -f flv -s 320x240 $outputflvdirectory";       
       $scrcap = "/usr/bin/ffmpeg -i $outputflvdirectory -s 320x240 -ss 00:00:05 -t 00:00:01 -f image2 flvmovies/screencaps/$var_loggedinuser-$timestamp-screencap.jpg";
       $filein = "/usr/bin/ffmpeg -i $outputflvdirectory 2> flvmovies/filestats/$var_loggedinuser-$timestamp-info.txt";
       
          
       ## execute
       exec($encode);
       exec($scrcap);
       exec($filein);
       
       return("$var_loggedinuser-$timestamp-screencap.jpg");
     
     }
?>

 

i want to return both:

 

$var_loggedinuser-$timestamp-screencap.jpg");

 

and

 

$var_loggedinuser-$timestamp-info.txt

 

i can return 1 fine but not two, can anyone tell me how i can return both?

 

cheers

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/81854-returning-multiple-values-from-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.