Mastering Development

Notice: Array to string conversion in PHP Json problems

I’m very new to php I have been watching some youtube videos I have a json file [{"name":"hally","ip":{"ip":[1,2,3,4]}},{"name":"Olojak","ip":{"ip":[11,22,33,44]}},{"name":"Andy","ip":{"ip":[111,222,333,444]}},{"name":"NoMad","ip":{"ip":[1111,2222,3333,4444]}},{"name":"ni","ip":{"ip":[11111,22222,33333,44444]}},{"name":"Nish","ip":{"ip":[111111,222222,333333,444444]}},{"name":"hs","ip":{"ip":[1111111,2222222,333333,4444444]}},{"name":"Kif","ip":{"ip":[11111111,22222222,33333333,44444444]}},{"name":"Kip","ip":{"ip":[111111111,111111111,111111111,11111111]}}] and i want to display each name and ip address this is my php file <?php $jsondata = file_get_contents("info.json"); $names = json_decode($jsondata, true); foreach ($names as $user){ echo $user[‘name’]."<br/>"; echo "IP:".$user[‘ip’]; echo "<br/>"; }; //echo "<br/>"; echo […]

Linux Mastering Development

Unable to separate valid and invalid file in unix script topic

I have three files named as a.csv, b.csv, and c.csv. a.csv has content 1234567,11111111111111111111111111111111111111111111111111 b.csv has content like 1234567845610111211111111111111111111111111 c.csv has content 111111,22222222,3333333,,,44444444444444444444 From the above mentioned three files I require only a.csv which means file with two column which should not contain any null values and remaining files (b.csv and c.csv) which has to […]


Use v-model with v-select, where the initial v-model value is not in items tag

I want to have a value that is not in the displayNumberList to be preselected, but not selectable(aka not in the displayNumberList). I’ve found that the v-model value has to be a value in the displayNumberList in order for it to be selected, is there a way around this? <v-select v-model=”displayNumber” :items=”displayNumberList”></v-select> Here’s the data […]