I am inserting post meta into database using wordpress, the field I want to insert is video url but sometimes I insert video folder address from my windows. the way they are inserted is like this:
s:162:"a:1:
{i:0;a:5:
{s:4:"type";
s:1:"2";s:4:"lang";
s:3:"364";s:7:"quality";
s:3:"365";
s:4:"link";
s:41:"https://www.youtube.com/embed/j49fPpRiNgc";
s:4:"date";
s:4:"2021";}}";
s:306:
"a:2:{i:0;a:5:
{s:4:"type";
s:1:"2";
s:4:"lang";
s:3:"364";
s:7:"quality";
s:3:"366";
s:4:"link";
s:27:"D:\films\242\Pompeii.mkv";
s:4:"date";s:9:"30/6/2021";}}";
The first one is video URL and the second one is video address. So when I want to show them first I need to convert to array using unserialize() function but for video address, its not working.
<?php
$trmovieslinks = unserialize(get_post_meta($post->ID, 'trmovieslink', true));
var_dump($trmovieslinks);
?>
for video address it returns nothing.