0

I have the following code

$arr =  array(
     'media[]'  => "@{$image};type=image/jpeg;filename={$image}"
);

I do not know what line 2 means. What do the [], @ and {} stand for?

UPDATE:

This is a code extracted from Upload images on Twitter using PHP.

Used to upload images to Twitter. I need to implement the same in Lua. Hence this question.

Community
  • 1
  • 1
SatheeshJM
  • 3,575
  • 8
  • 37
  • 60

2 Answers2

3
$arr =  array(
     'media[]'  => "@{$image};type=image/jpeg;filename={$image}",
);

is just like

$arr =  array(
     'media[]'  => "@".$image.";type=image/jpeg;filename=".$image,
);

See the PHP manual for what the curly brackets ({}) mean in double-quoted strings.

And for "[]" and "@" they are just normal strings.

Alvin Wong
  • 12,210
  • 5
  • 51
  • 77
0

Something error in this code.This is set a output path of the image..is this a Template code ?

TechGuy
  • 4,298
  • 15
  • 56
  • 87