php - Multiple Upload and Image names -
I have a multiple upload form that changes the name of images after uploading:
($ I = 0; $ i & lt; counts ($ _ files ['picture'] ['name']); $ i ++) {$ ext = end (explosion (".", $ _FILES ['images'] ['name'] [$ i])); $ Name = rand (1111111,9999999) '.' $ Ext. } Withprint_r ($ name)
output is a stringimage1.jpgimage2.jpgimage3.jpg
. Why is the output string? How can I give an array? Thanks in advance
$ name [] = rand (1111111,9999999). '.' . $ Ext;
will
bonus:
$ ext = pathinfo ($ _ files ['picture'] ['name'] [$ I], Pathinfo_expression);
Comments
Post a Comment