Display file uploads
-
I’m trying to get a file upload to display (using the regular file upload, not advanced) and I used the exact code that’s on the documentation page, but I’m getting an error.
Here’s the code I’m using:
$files = rwmb_meta( 'ks_file' ); // Since 4.8.0 if ( !empty( $files ) ) { foreach ( $files as $file ) { echo "<a title="{$file[" href="{$file[">{$file['name']}</a>"; } }Here’s the error I’m getting:
Parse error: syntax error, unexpected ‘{‘, expecting ‘,’ or ‘;’
It seems to be the fourth line that’s causing the issue, but I don’t know how to modify it to make it display correctly.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Display file uploads’ is closed to new replies.