Onepieceunlimitedcruise2wiiisodownload I need to split or seperate it into groups that are individual links. The reason I want to do this is I am going to insert a snippet into each group but it will not work if all the groups are in the same link. Here is what I tried so far: $group_names = array(); $num_groups = 0; if (stripos($line, "onepieceunlimitedcruise2wiiisodownload")!== false) { $group_names[$num_groups] = substr($line, strpos($line, "onepieceunlimitedcruise2wiiisodownload") + 9); $num_groups++; if ($num_groups == 9) { $num_groups = 0; } } foreach ($group_names as $name => $group_name) { echo $group_name; } But I do not know what would be best to continue using this method. The links are in a text file. A: You can use an array of matches to group them, then it's as easy as just sticking them into your file: $matches = [ 0 => '', 1 => '', 2 => '', 3 => '', 4 => '' ]; foreach ($matches as $match) { file_put_contents('/tmp/output.txt', $match); } Obviously you will still have to loop through the matches to get the URLs, but now you can just grab each group and put them into the file. We use cookies to give you the best possible online experience. If you continue, we’ll assume you are happy for your web browser to receive all cookies from our website. See our cookie policy for more information on cookies and how to manage them. News Are you a high net worth client? An investor moving up the Q: Saving multiple textures to one file using LibGDX I'm currently working on a LibGDX game, and i have multiple platforms that are connected through their environment map. To be able to show the environment map on my game, I need to be able to save the environment map to one texture. Currently I have about 16 textures, each representing a part of the map, and I have a collision manager that detects if the player gets too close to the platforms, and then it should change the collision map with the current environment map. My question is, is it possible to save the maps to a single file? A: You would create a Class to represent the environment map and then call the read method to load it. Then you would just add a method to your class which loads/writes files. So lets say you wanted to write the map to a file (and call it textures/map.png) public static EnvironmentMap map; public EnvironmentMap( Texture t){ this.map = new EnvironmentMap(t); } public void saveMap(){ FileHandle fileHandle = Gdx.files.local(); FileOutputStream output = null; try{ if(fileHandle!= null && fileHandle.exists()){ output = fileHandle.createWriter(); output.write(map.getImageData()); } }catch (FileNotFoundException e){ //do nothing }finally{ if(output!= null){ try{ output.close(); }catch (IOException e){ System.out.println(e); } } } } Then you could load it like this public void 1cdb36666d
Related links:
Commentaires