( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ
<?php
$theJson = '[{"canvas":{"version":"4.6.0","objects":[{"type":"image","version":"4.6.0","originX":"center","originY":"center","left":666,"top":493,"width":672,"height":982,"fill":"rgb(30, 139, 195)","stroke":"#000","strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"selectable":true,"evented":true,"lockMovementX":true,"lockMovementY":true,"lockRotation":false,"lockScalingX":true,"lockScalingY":true,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"crossOrigin":"anonymous","name":"image","data":{"id":"195212"},"src":"http://localhost/thebrand/taswira.php?width=672&height=982&quality=100&cropratio=&image=/v/uploads/gthumbs/{dynamicimage}imagethebrand27.png","filters":[]},{"type":"image","version":"4.6.0","originX":"center","originY":"center","left":501,"top":501,"width":1002,"height":1002,"fill":"rgb(30, 139, 195)","stroke":"#000","strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"selectable":true,"evented":true,"lockMovementX":true,"lockMovementY":true,"lockRotation":false,"lockScalingX":true,"lockScalingY":true,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"crossOrigin":"anonymous","name":"image","data":{"id":"576904"},"src":"http://localhost/thebrand/taswira.php?width=1002&height=1002&quality=100&cropratio=1:1&image=/v/uploads/gthumbs/Vector_Smart%20Objectthebrand66.png","filters":[]},{"type":"image","version":"4.6.0","originX":"center","originY":"center","left":501,"top":503,"width":1002,"height":1002,"fill":"rgb(30, 139, 195)","stroke":"#000","strokeWidth":0,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"cropX":0,"cropY":0,"selectable":true,"evented":true,"lockMovementX":true,"lockMovementY":true,"lockRotation":false,"lockScalingX":true,"lockScalingY":true,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"crossOrigin":"anonymous","name":"image","data":{"id":"814270"},"src":"http://localhost/thebrand/taswira.php?width=1002&height=1002&quality=100&cropratio=1:1&image=/v/uploads/gthumbs/Designthebrand67.png","filters":[]},{"type":"i-text","version":"4.6.0","originX":"center","originY":"center","left":200.84,"top":261.51,"width":322.14,"height":50.85,"fill":"rgb(255, 255, 255)","stroke":"#000","strokeWidth":0.1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"fontFamily":"Krona One","fontWeight":400,"fontSize":45,"text":"item name","underline":false,"overline":false,"linethrough":false,"textAlign":"initial","fontStyle":"normal","lineHeight":1.1,"textBackgroundColor":"","charSpacing":0,"styles":[],"direction":"ltr","path":null,"pathStartOffset":0,"pathSide":"left","selectable":true,"evented":true,"lockMovementX":false,"lockMovementY":false,"lockRotation":false,"lockScalingX":false,"lockScalingY":false,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"name":"text","data":{"id":"869969"}},{"type":"i-text","version":"4.6.0","originX":"center","originY":"center","left":107.04,"top":402.55,"width":136.09,"height":32.77,"fill":"rgb(255, 255, 255)","stroke":"#000","strokeWidth":0.1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"fontFamily":"Playfair Display","fontWeight":400,"fontSize":29,"text":"Item details","underline":false,"overline":false,"linethrough":false,"textAlign":"initial","fontStyle":"normal","lineHeight":1.1,"textBackgroundColor":"","charSpacing":0,"styles":[],"direction":"ltr","path":null,"pathStartOffset":0,"pathSide":"left","selectable":true,"evented":true,"lockMovementX":false,"lockMovementY":false,"lockRotation":false,"lockScalingX":false,"lockScalingY":false,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"name":"text","data":{"id":"182943"}},{"type":"i-text","version":"4.6.0","originX":"center","originY":"center","left":124.35,"top":345.08,"width":150.59,"height":44.07,"fill":"rgb(255, 255, 255)","stroke":"#000","strokeWidth":0.1,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"fontFamily":"Abril Fatface","fontWeight":400,"fontSize":39,"text":"Ksh 3000","underline":false,"overline":false,"linethrough":false,"textAlign":"initial","fontStyle":"normal","lineHeight":1.1,"textBackgroundColor":"","charSpacing":0,"styles":[],"direction":"ltr","path":null,"pathStartOffset":0,"pathSide":"left","selectable":true,"evented":true,"lockMovementX":false,"lockMovementY":false,"lockRotation":false,"lockScalingX":false,"lockScalingY":false,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"hasRotatingPoint":true,"name":"text","data":{"id":"811067"}},{"type":"i-text","version":"4.6.0","originX":"center","originY":"center","left":184.1,"top":440.9,"width":120.96,"height":63.28,"fill":"rgb(255, 255, 255)","stroke":null,"strokeWidth":0.05,"strokeDashArray":null,"strokeLineCap":"butt","strokeDashOffset":0,"strokeLineJoin":"miter","strokeUniform":false,"strokeMiterLimit":4,"scaleX":2.51,"scaleY":2.51,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"backgroundColor":null,"fillRule":"nonzero","paintFirst":"fill","globalCompositeOperation":"source-over","skewX":0,"skewY":0,"fontFamily":"Corinthia Bold","fontWeight":"normal","fontSize":56,"text":"my text","underline":false,"overline":false,"linethrough":false,"textAlign":"initial","fontStyle":"normal","lineHeight":1.16,"textBackgroundColor":"","charSpacing":0,"styles":{},"direction":"ltr","path":null,"pathStartOffset":0,"pathSide":"left","selectable":true,"evented":true,"lockMovementX":false,"lockMovementY":false,"lockRotation":false,"lockScalingX":false,"lockScalingY":false,"lockUniScaling":false,"hasControls":true,"hasBorders":true,"name":"text","data":{"id":"tpLEQNcfn7"}}]},"editor":{"frame":null,"zoom":0.5736000366210937,"activeObjectId":null},"canvasWidth":"1000","canvasHeight":"1000"}]';
$characters = json_decode($theJson,true);
$characters=$characters['0']['canvas']['objects'];
foreach ($characters as $row) {
echo $layerType = $row['type'] ;
/*
$check = checkTypeX($layerType);
include("interpret.php");*/
}
/*$json = $row['layers2'];
$fontJson = "[".rtrim($fontJson, ',')."]";;
$json = "[".rtrim($json, ',')."]";
$characters = json_decode($json,true);
$charactersFonts = json_decode($fontJson,true);
$this->response["canvas"] = array();
$this->response["canvas"]["version"] = "3.6.6";
$this->response["canvas"]["objects"] = $characters;
$this->response["editor"]["fonts"] = $charactersFonts;
$this->response["canvasWidth"] = $designWidth;
$this->response["canvasHeight"] = $designHeight;
$theJson = json_encode($this->response);
echo $theJson;
*/
?>